@Test
public void uniqueNamesAreRequired() {

    final Endpoint endpointA = new Endpoint("foo", "bar", 80);
    final Endpoint endpointB = new Endpoint("foo", "baz", 82);
    final Endpoint endpointC = new Endpoint("foo", "localhost", 80);
    final Endpoint endpointD = new Endpoint("foobar", "localhost", 80);
    final ServiceData serviceData = new ServiceData(new ArrayList<Endpoint>());
    assertThat(serviceData.addEndpoint(endpointA), is(true));
    assertThat(serviceData.addEndpoint(endpointB), is(false));
    assertThat(serviceData.addEndpoint(endpointC), is(false));
    assertThat(serviceData.addEndpoint(endpointD), is(true));
}