### Question:
LibraryServiceImpl implements LibraryService { @Override @SuppressWarnings("unchecked") public List<Document> getLibs(String user, String project, String exploratoryName, String computationalName) { if (StringUtils.isEmpty(computationalName)) { return (List<Document>) libraryDAO.findExploratoryLibraries(user, project, exploratoryName) .getOrDefault(ExploratoryLibDAO.EXPLORATORY_LIBS, new ArrayList<>()); } else { Document document = (Document) libraryDAO.findComputationalLibraries(user, project, exploratoryName, computationalName) .getOrDefault(ExploratoryLibDAO.COMPUTATIONAL_LIBS, new Document()); return (List<Document>) document.getOrDefault(computationalName, new ArrayList<>()); } }  @Override @SuppressWarnings("unchecked") List<Document> getLibs(String user, String project, String exploratoryName, String computationalName); @Override @SuppressWarnings("unchecked") List<LibInfoRecord> getLibInfo(String user, String project, String exploratoryName); @Override String installComputationalLibs(UserInfo ui, String project, String expName, String compName,
										   List<LibInstallDTO> libs); @Override String installExploratoryLibs(UserInfo ui, String project, String expName, List<LibInstallDTO> libs);  }### Answer:
@Test public void testGetLibs() { Document document = new Document(); when(libraryDAO.findExploratoryLibraries(anyString(), anyString(), anyString())).thenReturn(document); List<Document> expectedList = new ArrayList<>(); List<Document> actualList = libraryService.getLibs(USER, PROJECT, EXPLORATORY_NAME, ""); assertNotNull(actualList); assertEquals(expectedList, actualList); verify(libraryDAO).findExploratoryLibraries(USER, PROJECT, EXPLORATORY_NAME); verifyNoMoreInteractions(libraryDAO); }