MediaService { public Observable<MediaContainer> firstCharacter(HttpUrl url, String libKey, String mediaKey) { return api.get(url.newBuilder() .addPathSegments("library/sections") .addPathSegment(libKey) .addPathSegment("firstCharacter") .addQueryParameter("type", mediaKey) .build()); } MediaService(Api api); Observable<MediaContainer> sections(HttpUrl url); Observable<MediaContainer> albums(HttpUrl url, String artistKey); Observable<MediaContainer> tracks(HttpUrl url, String albumKey); Observable<MediaContainer> popularTracks(HttpUrl url, String libKey, String artistKey); Observable<MediaContainer> browse(HttpUrl url, String libKey, String mediaKey,
                                           int offset); Observable<MediaContainer> recentArtists(HttpUrl url, String libKey); Observable<MediaContainer> firstCharacter(HttpUrl url, String libKey, String mediaKey); Completable timeline(HttpUrl url, long queueItemId, String trackKey, String trackRatingKey,
                              String state, long duration, long time); Single<MediaContainer> playQueue(HttpUrl url, String trackKey, String trackParentKey,
                                          String libraryId);  }
@Test public void firstCharacter() { media.firstCharacter(URL, "libKey", "mediaKey"); assertThat(api.actual, is("https: "X-Plex-Token=token&type=mediaKey")); }