### Question:
Addresses { public static String toObjectAddress(String namespace, String id) { if(id == null) { return toServiceAddress(namespace); } if(namespace == null) throw new IllegalArgumentException("namespace may not be null"); String prefix = getPrefixForNamespace(namespace); return prefix + namespace + ":" + id; }  static String toServiceAddress(String namespace); static String toObjectAddress(String namespace, String id); static String getId(@Nullable String addressOrId);  }### Answer:
@Test public void testToObjectAddress() { assertEquals("SERV:person:", Addresses.toObjectAddress("person", null)); assertEquals("SERV:person:", Addresses.toObjectAddress("person", "")); assertEquals("SERV:person:test", Addresses.toObjectAddress("person", "test")); assertEquals("DRIV:dev:", Addresses.toObjectAddress("dev", null)); assertEquals("DRIV:dev:", Addresses.toObjectAddress("dev", "")); assertEquals("DRIV:dev:test", Addresses.toObjectAddress("dev", "test")); }