### Question:
STSInstanceConfig { @Override public boolean equals(Object other) { if (other instanceof STSInstanceConfig) { STSInstanceConfig otherConfig = (STSInstanceConfig)other; return Objects.equal(saml2Config, otherConfig.getSaml2Config()) && (persistIssuedTokensInCTS == otherConfig.persistIssuedTokensInCTS()) && Objects.equal(openIdConnectTokenConfig, otherConfig.getOpenIdConnectTokenConfig()); } return false; } protected  STSInstanceConfig(STSInstanceConfigBuilderBase<?> builder); SAML2Config getSaml2Config(); OpenIdConnectTokenConfig getOpenIdConnectTokenConfig(); boolean persistIssuedTokensInCTS(); static STSInstanceConfigBuilderBase<?> builder(); @Override String toString(); @Override boolean equals(Object other); JsonValue toJson(); static STSInstanceConfig fromJson(JsonValue json); Map<String, Set<String>> marshalToAttributeMap(); static STSInstanceConfig marshalFromAttributeMap(Map<String, Set<String>> attributeMap);  }### Answer:
@Test public void testEquals() throws UnsupportedEncodingException { STSInstanceConfig instance1 = buildConfig(WITH_SAML2_CONFIG, WITH_OIDC_CONFIG, PERSIST_TOKENS_IN_CTS); STSInstanceConfig instance2 = buildConfig(WITH_SAML2_CONFIG, WITH_OIDC_CONFIG, PERSIST_TOKENS_IN_CTS); assertEquals(instance1, instance2); instance1 = buildConfig(!WITH_SAML2_CONFIG, WITH_OIDC_CONFIG, PERSIST_TOKENS_IN_CTS); instance2 = buildConfig(!WITH_SAML2_CONFIG, WITH_OIDC_CONFIG, PERSIST_TOKENS_IN_CTS); assertEquals(instance1, instance2); instance1 = buildConfig(WITH_SAML2_CONFIG, !WITH_OIDC_CONFIG, PERSIST_TOKENS_IN_CTS); instance2 = buildConfig(WITH_SAML2_CONFIG, !WITH_OIDC_CONFIG, PERSIST_TOKENS_IN_CTS); assertEquals(instance1, instance2); instance1 = buildConfig(WITH_SAML2_CONFIG, !WITH_OIDC_CONFIG, !PERSIST_TOKENS_IN_CTS); instance2 = buildConfig(WITH_SAML2_CONFIG, !WITH_OIDC_CONFIG, !PERSIST_TOKENS_IN_CTS); assertEquals(instance1, instance2); }