### Question:
ChildrenManager { public synchronized List<String> getChildDSRs() { List<String> result = new ArrayList<String>(); Date currentTime = new Date(); Set<String> s=childServices.keySet(); Iterator<String> it=s.iterator(); while(it.hasNext()) { String key=it.next(); Date value=childServices.get(key); if ( value.getTime()+hour > currentTime.getTime()) { result.add(key); } else { childServices.remove(key); } } return result; } ChildrenManager(); static synchronized ChildrenManager getInstance(); synchronized List<String> getChildDSRs(); synchronized boolean addChildDSR(String identifier); synchronized void childLiveCheck();  }### Answer:
@Test public void testGetChildDSRs() { List<String> childs = new ArrayList<String>(); childs.add("test_child1"); childs.add("test_child2"); childs.add("test_child3"); try { manager.addChildDSR("test_child1"); manager.addChildDSR("test_child2"); manager.addChildDSR("test_child3"); } catch (EmptyIdentifierFailureException e) { fail("Detecting EmptyIdentifierFailureException exception."); } catch (NullPointerFailureException e) { fail("Detecting NullPointerFailureException exception."); } assertTrue(manager.getChildDSRs().containsAll(childs)); }