ApplicationRegistry { public List<Application> getApplications() { return new ArrayList<>(registry.values()); }  Application register(Application app); boolean isRegistered(String id); List<Application> getApplications(); Application getApplication(String id);  }
@Test public void getApplications() throws Exception { Application app = new Application(); app.setId("abc"); app.setUrl("http: registry.register(app); assertEquals(1, registry.getApplications().size()); assertEquals(app, registry.getApplications().get(0)); }