### Question:
RestSTSInstanceConfig extends STSInstanceConfig { @Override public boolean equals(Object other) { if (other instanceof RestSTSInstanceConfig) { RestSTSInstanceConfig otherConfig = (RestSTSInstanceConfig)other; return super.equals(otherConfig) && supportedTokenTransforms.equals(otherConfig.supportedTokenTransforms) && Objects.equals(customTokenValidators, otherConfig.customTokenValidators) && Objects.equals(customTokenProviders, otherConfig.customTokenProviders) && Objects.equals(customTokenTransforms, otherConfig.customTokenTransforms) && deploymentConfig.equals(otherConfig.deploymentConfig); } return false; } private  RestSTSInstanceConfig(RestSTSInstanceConfigBuilderBase<?> builder); static RestSTSInstanceConfigBuilder builder(); DeploymentConfig getDeploymentConfig(); Set<TokenTransformConfig> getSupportedTokenTransforms(); Set<TokenTransformConfig> getCustomTokenTransforms(); Set<CustomTokenOperation> getCustomTokenValidators(); Set<CustomTokenOperation> getCustomTokenProviders(); String getDeploymentSubPath(); @Override String toString(); @Override boolean equals(Object other); @Override int hashCode(); JsonValue toJson(); static RestSTSInstanceConfig fromJson(JsonValue json); Map<String, Set<String>> marshalToAttributeMap(); static RestSTSInstanceConfig marshalFromAttributeMap(Map<String, Set<String>> attributeMap); static RestSTSInstanceConfig marshalFromJsonAttributeMap(JsonValue jsonValue); static final String SUPPORTED_TOKEN_TRANSFORMS; static final String CUSTOM_TOKEN_PROVIDERS; static final String CUSTOM_TOKEN_VALIDATORS; static final String CUSTOM_TOKEN_TRANSFORMS; }### Answer:
@Test public void testEquals() throws UnsupportedEncodingException { RestSTSInstanceConfig ric1 = createInstanceConfig("/bob", WITH_TLS_OFFLOAD_CONFIG, WITH_SAML2_CONFIG, WITH_OIDC_CONFIG, !WITH_CUSTOM_VALIDATOR, !WITH_CUSTOM_PROVIDER, WITH_CTS_TOKEN_PERSISTENCE); RestSTSInstanceConfig ric2 = createInstanceConfig("/bob", WITH_TLS_OFFLOAD_CONFIG, WITH_SAML2_CONFIG, WITH_OIDC_CONFIG, !WITH_CUSTOM_VALIDATOR, !WITH_CUSTOM_PROVIDER, WITH_CTS_TOKEN_PERSISTENCE); assertEquals(ric1, ric2); assertEquals(ric1.hashCode(), ric2.hashCode()); ric1 = createInstanceConfig("/bob", WITH_TLS_OFFLOAD_CONFIG, !WITH_SAML2_CONFIG, WITH_OIDC_CONFIG, !WITH_CUSTOM_VALIDATOR, WITH_CUSTOM_PROVIDER, !WITH_CTS_TOKEN_PERSISTENCE); ric2 = createInstanceConfig("/bob", WITH_TLS_OFFLOAD_CONFIG, !WITH_SAML2_CONFIG, WITH_OIDC_CONFIG, !WITH_CUSTOM_VALIDATOR, WITH_CUSTOM_PROVIDER, !WITH_CTS_TOKEN_PERSISTENCE); assertEquals(ric1, ric2); assertEquals(ric1.hashCode(), ric2.hashCode()); ric1 = createInstanceConfig("/bob", WITH_TLS_OFFLOAD_CONFIG, WITH_SAML2_CONFIG, !WITH_OIDC_CONFIG, WITH_CUSTOM_VALIDATOR, !WITH_CUSTOM_PROVIDER, WITH_CTS_TOKEN_PERSISTENCE); ric2 = createInstanceConfig("/bob", WITH_TLS_OFFLOAD_CONFIG, WITH_SAML2_CONFIG, !WITH_OIDC_CONFIG, WITH_CUSTOM_VALIDATOR, !WITH_CUSTOM_PROVIDER, WITH_CTS_TOKEN_PERSISTENCE); assertEquals(ric1, ric2); assertEquals(ric1.hashCode(), ric2.hashCode()); }