RuneLiteAPI { public static String getVersion() { return version; }  static HttpUrl getSessionBase(); static HttpUrl getApiBase(); static HttpUrl getStaticBase(); static HttpUrl getWsEndpoint(); static String getVersion(); static void setVersion(String version); static int getRsVersion(); static final String RUNELITE_AUTH; static final String RUNELITE_MACHINEID; static final OkHttpClient CLIENT; static final Gson GSON; static final MediaType JSON; static String userAgent; }
@Test public void testUserAgent() throws IOException, InterruptedException { Request request = new Request.Builder() .url(server.url("/").url()) .build(); RuneLiteAPI.CLIENT.newCall(request).execute().close(); assertTrue(server.takeRequest().getHeader("User-Agent").startsWith("RuneLite/" + RuneLiteAPI.getVersion())); }