### Question:
GlossaryService extends GlossaryViewOMAS { public GlossaryViewEntityDetailResponse getAllGlossaries(String userId, String serverName, Integer from, Integer size){ return getAllEntityDetailsResponse(userId, serverName, GLOSSARY_TYPE_NAME, from, size, "getAllGlossaries"); } GlossaryService(); GlossaryViewEntityDetailResponse getGlossary(String userId, String serverName, String glossaryGUID); GlossaryViewEntityDetailResponse getAllGlossaries(String userId, String serverName, Integer from, Integer size); GlossaryViewEntityDetailResponse getTermHomeGlossary(String userId, String serverName, String termGUID); GlossaryViewEntityDetailResponse getCategoryHomeGlossary(String userId, String serverName, String categoryGUID); GlossaryViewEntityDetailResponse getExternalGlossaryLinks(String userId, String serverName, String glossaryGUID,
                                                                     Integer from, Integer size);  }### Answer:
@Test public void getAllGlossaries() throws Exception{ when(repositoryHandler.getEntitiesByType(eq(USER_ID), eq(GLOSSARY_TYPE_GUID), anyInt(), anyInt(), eq("getAllGlossaries"))).thenReturn(glossaries); GlossaryViewEntityDetailResponse response = underTest.getAllGlossaries(USER_ID, SERVER_NAME, 0, 10); assertEquals(3, response.getResult().size()); assertGlossaryProperties(glossaries.get(0), (Glossary)response.getResult().get(0)); assertGlossaryProperties(glossaries.get(1), (Glossary)response.getResult().get(1)); assertGlossaryProperties(glossaries.get(2), (Glossary)response.getResult().get(2)); assertTrue(isEffective.test(response.getResult().get(0))); assertTrue(isEffective.test(response.getResult().get(1))); assertTrue(isEffective.test(response.getResult().get(2))); }