ProfileReference { @JsonCreator public static ProfileReference parse(String raw) { final int idx = raw.indexOf(':'); if (idx != -1) { final String type = raw.substring(0, idx); return new ProfileReference(ProfileType.create(type), raw.substring(idx + 1, raw.length()) ); } throw new IllegalArgumentException("Unexpected format. Required format: [TYPE]:[NAME]"); } @Deprecated  ProfileReference();  ProfileReference(ProfileType type, String name); @JsonCreator static ProfileReference parse(String raw); ProfileType getType(); String getName(); @JsonValue String getCompactRepresentation();  }
@Test public void testParse() throws Exception { final ProfileReference ref = ProfileReference.parse("application:MyApplication"); assertEquals(ProfileType.APPLICATION, ref.getType()); assertEquals("MyApplication", ref.getName()); }