Registry { public Collection<Link> getAll() { return links; } Registry(final String name, final String title, final List<Link> links); String getName(); String getTitle(); Collection<Link> getAll(); Link findByHref(final URI href); Link asLinkFor(final URI baseUri);  }
@Test public void shouldCreateEmptyLinks() { final Registry registry = new Registry("foo", "", Collections.<Link>emptyList()); assertTrue(registry.getAll().isEmpty()); }
@Test public void shouldCreateLinks() { final Link link = new Link(create("http: final Registry registry = new Registry("foo", "", singletonList( link )); assertEquals(registry.getAll(), singletonList(link)); }