@Test public void shouldUseAllTheRequestParamsAddedFromQueryWhenSendIt() throws Exception {
SeriesApiClient seriesApiClient = givenSeriesApiClient();
enqueueMockResponse();
SeriesQuery query = SeriesQuery.Builder.create()
.withTitle(ANY_TITLE)
.withTitleStartsWith(ANY_START_TITLE)
.withStartYear(ANY_START_YEAR)
.withLimit(ANY_LIMIT)
.withOffset(ANY_OFFSET)
.addCreator(ANY_CREATOR)
.addCharacter(ANY_CHARACTER)
.withModifiedSince(getAnyDate())
.withOrderBy(OrderBy.NAME, false)
.addEvent(getAnyEvents())
.addComic(ANY_COMIC)
.addStory(ANY_STORY)
.withContains(Format.COMIC)
.withSeriesType(SeriesQuery.SeriesType.COLLECTION)
.build();
seriesApiClient.getAll(query);
assertRequestSentToContains("startYear=" + ANY_START_YEAR, "creators=" + ANY_CREATOR,
"characters=" + ANY_CHARACTER, "offset=" + ANY_OFFSET, "limit=" + ANY_LIMIT,
"title=" + ANY_TITLE, "titleStartsWith=" + ANY_START_TITLE,
"modifiedSince=" + ANY_MODIFIED_SINCE, "orderBy=" + ORDER_NAME_DESCEDANT_VALUE,
"events=" + EVENTS_REQUEST, "comics=" + ANY_COMIC, "stories=" + ANY_STORY,
"contains=" + Format.COMIC.toString(),
"seriesType=" + SeriesQuery.SeriesType.COLLECTION.toString());
}