### Question:
Addresses { public static String getId(@Nullable String addressOrId) { if(addressOrId == null) { return ""; } int indexOf = addressOrId.lastIndexOf(":"); if(indexOf < 0) { return addressOrId; } else if(indexOf == addressOrId.length() - 1) { return ""; } return addressOrId.substring(indexOf + 1); }  static String toServiceAddress(String namespace); static String toObjectAddress(String namespace, String id); static String getId(@Nullable String addressOrId);  }### Answer:
@Test public void testGetId() { assertEquals("", Addresses.getId(null)); assertEquals("", Addresses.getId("")); assertEquals("", Addresses.getId("SERV:person:")); assertEquals("id", Addresses.getId("id")); assertEquals("id", Addresses.getId("SERV:person:id")); }