@Test
  public void testParseFullAppId() {
    // [(partition)~][(domain):](display-app-id)
    ApiProxy.Environment env = ApiProxy.getCurrentEnvironment();
    String hostname =
        (String) env.getAttributes().get("com.google.appengine.runtime.default_version_hostname");
    AppIdentityService.ParsedAppId parsed = appIdentity.parseFullAppId(hostname);

    String message = createParsed(parsed);
    Assert.assertEquals(
        message,
        property("testParseFullAppId_partition").getPropertyValue(),
        parsed.getPartition());
    Assert.assertEquals(
        message, getExpectedAppHostname("testParseFullAppId_domain"), parsed.getDomain());
    Assert.assertEquals(message, getExpectedAppId("testParseFullAppId_id"), parsed.getId());
  }
 private String createParsed(AppIdentityService.ParsedAppId parsed) {
   return parsed.getDomain() + " : " + parsed.getId() + " : " + parsed.getPartition();
 }