ApplicationRegistry { public boolean isRegistered(String id) { return registry.containsKey(id); }  Application register(Application app); boolean isRegistered(String id); List<Application> getApplications(); Application getApplication(String id);  }
@Test public void isRegistered() throws Exception { Application app = new Application(); app.setId("abc"); app.setUrl("http: registry.register(app); assertFalse(registry.isRegistered("xyz")); assertTrue(registry.isRegistered("abc")); }