### Question:
StudyEJB3DAO extends AccessibleEJB3DAO<Study> implements StudyDAO { public Map<String, VisibilityStatus> getVisibilityStatusForStudies() { Query query = entityManager.createQuery("SELECT distinct s.acc, s.status " + "FROM Study s"); List list = query.getResultList(); Map<String, VisibilityStatus> answer = new HashMap<String, VisibilityStatus>(list.size()); for (Object aList : list) { Object[] row = (Object[]) aList; if (row.length == 2) { answer.put((String) row[0], (VisibilityStatus) row[1]); } } return answer; } StudyEJB3DAO();  StudyEJB3DAO(EntityManager entityManager); List<Property<FactorValue>> getFactorsForStudy(Long studyId); List<Property<CharacteristicValue>> getCharacteristicsForStudy(Long studyId); List<PropertyValue> getValuesOfPropertyForStudyId(Long studyId, String propertyName); List<PropertyValue> getValuesOfPropertyForStudyAcc(String studyAcc, String propertyName); List<String> filterByOntologyTermAndRefAcc(String termAcc, String refSourceAcc); List<String> filterByOntologyTermAndRefName(String termAcc, String refSourceName); List<String> filterFactorsByOntologyTermAndRefName(String termAcc, String refSourceName); List<String> filterFactorsByOntologyTermAndRefNameForUser(String termAcc, String refSourceName, String userName); boolean studyExists(String acc); List<String> getAllStudyAccs(); List<Study> getStudiesByContact(Contact contact); List<Study> getStudiesByContactLastName(String lastName); List<Study> getStudiesByContactEmail(String email); List<Study> getStudiesByContactAffiliation(String affiliation); List<Study> getStudiesByPubmedIdOrDoi(String id); List<Study> getStudiesByProperty(PropertyValuesWS property); List<Study> getStudiesByAssayType(AssayTypeWS assayType); List<String> getPublicStudyAccs(); List<String> getStudyAccForUser(String userName); List<String> getOwnedStudiesForUser(String userName); Study getByAccForUser(String acc, String userName); void changeStudyStatus(String acc, VisibilityStatus status); Map<String, VisibilityStatus> getVisibilityStatusForStudies(); void addUserToStudy(String acc, User user); void removeUserFromStudy(String acc, User user);  }### Answer:
@Test public void testGetVisibilityStatusForStudies() throws Exception { Map<String, VisibilityStatus> statusMap = dao.getVisibilityStatusForStudies(); assertNotNull(statusMap); assertEquals(3, statusMap.size()); assertEquals(VisibilityStatus.PRIVATE, statusMap.get("BII-ST-1")); assertEquals(VisibilityStatus.PUBLIC, statusMap.get("BII-ST-2")); }