### Question:
CustomUserInfoEngineClient { public List<CustomUserInfoDefinition> listDefinitions(int startIndex, int maxResult) { return identity.getCustomUserInfoDefinitions(startIndex, maxResult); } CustomUserInfoEngineClient(IdentityAPI identity); CustomUserInfoDefinition createDefinition(CustomUserInfoDefinitionCreator creator); void deleteDefinition(long id); List<CustomUserInfoDefinition> listDefinitions(int startIndex, int maxResult); long countDefinitions(); List<CustomUserInfo> listCustomInformation(long userId, int startIndex, int maxResult); SearchResult<CustomUserInfoValue> searchCustomUserInfoValues(SearchOptions options); CustomUserInfoValue setCustomUserInfoValue(long definitionId, long userId, String value);  }### Answer:
@Test public void should_list_definitions_for_a_given_range() throws Exception { given(engine.getCustomUserInfoDefinitions(0, 2)).willReturn(Arrays.<CustomUserInfoDefinition>asList( new EngineCustomUserInfoDefinition(1L), new EngineCustomUserInfoDefinition(2L))); List<CustomUserInfoDefinition> definitions = client.listDefinitions(0, 2); assertThat(definitions.get(0).getId()).isEqualTo(1L); assertThat(definitions.get(1).getId()).isEqualTo(2L); }