@Test
public void testServerId() {

    String id = DMREndpointService.getServerIdentifier("one", "two", "three", null);
    assertEquals("one.two.three", id);
    id = DMREndpointService.getServerIdentifier(null, "two", "three", null);
    assertEquals("two.three", id);
    id = DMREndpointService.getServerIdentifier(null, null, "three", null);
    assertEquals("three", id);
    id = DMREndpointService.getServerIdentifier(null, null, null, null);
    assertEquals("", id);
    id = DMREndpointService.getServerIdentifier("", "two", "three", null);
    assertEquals("two.three", id);
    id = DMREndpointService.getServerIdentifier("", "", "three", null);
    assertEquals("three", id);
    id = DMREndpointService.getServerIdentifier("", "", "", null);
    assertEquals("", id);
    // if server name and node name are the same, only one is added to the full ID
    id = DMREndpointService.getServerIdentifier("one", "two", "two", null);
    assertEquals("one.two", id);
    id = DMREndpointService.getServerIdentifier("", "two", "two", null);
    assertEquals("two", id);
    id = DMREndpointService.getServerIdentifier(null, "two", "two", null);
    assertEquals("two", id);
    String uuid = UUID.randomUUID().toString();
    id = DMREndpointService.getServerIdentifier("a", "b", "c", uuid);
    assertEquals(uuid, id);
}