OpeningHoursRequest extends JsonArrayRequest<OpeningHours> { @NonNull @Override protected String getAPIUrl() { return Endpoints.LIBRARY + "libraries/" + libraryCode + "/calendar.json"; } OpeningHoursRequest(Context context, Library library);  OpeningHoursRequest(Context context, String libraryCode); @Override Duration getCacheDuration(); Request<Optional<OpeningHours>> forDay(LocalDate date);  }
@Test public void testLibraryCode() throws IOException { Library library = getRandomConstLibrary(); OpeningHoursRequest request = getRequest(); assertThat(request.getAPIUrl(), endsWith("libraries/" + library.getCode() + "/calendar.json")); }