Policy { public String getId() { return id; } Policy();  Policy(String id);  Policy(String id, Collection<Statement> statements); String getId(); void setId(String id); Policy withId(String id); String getVersion(); Collection<Statement> getStatements(); void setStatements(Collection<Statement> statements); Policy withStatements(Statement... statements); String toJson(); static Policy fromJson(String jsonString); static Policy fromJson(String jsonString, PolicyReaderOptions options);  }
@Test public void testPrincipalAccountId() { String ID_WITH_HYPHEN = "a-b-c-d-e-f-g"; String ID_WITHOUT_HYPHEN = "abcdefg"; Assert.assertEquals(ID_WITHOUT_HYPHEN, new Principal(ID_WITH_HYPHEN).getId()); Assert.assertEquals(ID_WITHOUT_HYPHEN, new Principal("AWS", ID_WITH_HYPHEN).getId()); Assert.assertEquals(ID_WITH_HYPHEN, new Principal("Federated", ID_WITH_HYPHEN).getId()); Assert.assertEquals(ID_WITH_HYPHEN, new Principal("AWS", ID_WITH_HYPHEN, false).getId()); }