### Question:
Id { public Id(String systemName, String objectType) throws JsonResourceException { if (StringUtils.isBlank(systemName)) { throw new JsonResourceException(400, "System name can not be blank"); } if (StringUtils.isBlank(objectType)) { throw new JsonResourceException(400, "Object type can not be blank"); } try { this.baseURI = new URI(""); this.systemName = URLDecoder.decode(systemName, CHARACTER_ENCODING_UTF_8); this.objectType = URLDecoder.decode(objectType, CHARACTER_ENCODING_UTF_8); } catch (URISyntaxException e) { throw new UndeclaredThrowableException(e); } catch (UnsupportedEncodingException e) { throw new UndeclaredThrowableException(e); } } Id(String systemName, String objectType);  Id(String systemName, String objectType, String localId); @SuppressWarnings("fallthrough")  Id(String id); String getLocalId(); String getObjectType(); String getSystemName(); Id expectObjectId(); Id resolveLocalId(String uid); URI getId(); URI getQualifiedId(); @Override String toString(); static String escapeUid(String uid); static String unescapeUid(String uid); static final String SYSTEM_BASE; static final String CHARACTER_ENCODING_UTF_8; }### Answer:
@Test public void testId() throws Exception { String idString = "system/xml/account"; Id id = new Id(idString); Assert.assertEquals(id.getSystemName(), "xml"); Assert.assertEquals(id.getObjectType(), "account"); Assert.assertNull(id.getLocalId()); idString = "system/xml/account/af352880-73e0-11e0-a1f0-0800200c9a66"; id = new Id(idString); Assert.assertEquals(id.getSystemName(), "xml"); Assert.assertEquals(id.getObjectType(), "account"); Assert.assertEquals(id.getLocalId(), "af352880-73e0-11e0-a1f0-0800200c9a66"); idString = "system/Active Directory/User type/<GUID=500ac9a4c732df45bde6e5dbc784de04>"; id = new Id(idString); Assert.assertEquals(id.getSystemName(), "Active Directory"); Assert.assertEquals(id.getObjectType(), "User type"); Assert.assertEquals(id.getLocalId(), "<GUID=500ac9a4c732df45bde6e5dbc784de04>"); idString = "system/Active+Directory/User+type/%3CGUID%3D500ac9a4c732df45bde6e5dbc784de04%3E"; Assert.assertEquals(id.getQualifiedId().toString(), idString); id = new Id(idString); Assert.assertEquals(id.getSystemName(), "Active Directory"); Assert.assertEquals(id.getObjectType(), "User type"); Assert.assertEquals(id.getLocalId(), "<GUID=500ac9a4c732df45bde6e5dbc784de04>"); }