@Test
public void shouldGetAndReplaceAlreadyPresentPageSizeParam() throws SDKException {
// Given
String myUrlWithOtherParamAndPageSize = URL + "?param1=value1&pageSize=15¶m2=value2";
target = createPagedCollectionResource(restConnector, myUrlWithOtherParamAndPageSize, PAGE_SIZE, MEDIA_TYPE, CLAZZ);
TestCollectionRepresentation expectedRepresentation = new TestCollectionRepresentation();
String expectedUrl = URL + "?param1=value1¶m2=value2&pageSize=" + PAGE_SIZE;
when(restConnector.get(argThat(matchesUrl(expectedUrl)), eq(MEDIA_TYPE), eq(CLAZZ))).thenReturn(expectedRepresentation);
// When
TestCollectionRepresentation page = target.get();
// Then
assertThat(page, sameInstance(expectedRepresentation));
}