### Question:
TokenGenerationServiceInvocationState { @Override public boolean equals(Object other) { if (other == this) { return true; } if (other instanceof TokenGenerationServiceInvocationState) { TokenGenerationServiceInvocationState oc = (TokenGenerationServiceInvocationState)other; return ssoTokenString.equals(oc.getSsoTokenString()) && tokenType.equals(oc.getTokenType()) && stsInstanceId.equals(oc.getStsInstanceId()) && stsType.equals(oc.getStsType()) && Objects.equal(saml2TokenGenerationState, oc.getSaml2TokenGenerationState()) && Objects.equal(openIdConnectTokenGenerationState, oc.getOpenIdConnectTokenGenerationState()) && realm.equals(oc.getRealm()); } return false; } private  TokenGenerationServiceInvocationState(TokenGenerationServiceInvocationStateBuilder builder); static TokenGenerationServiceInvocationStateBuilder builder(); String getSsoTokenString(); TokenType getTokenType(); String getStsInstanceId(); AMSTSConstants.STSType getStsType(); String getRealm(); SAML2TokenGenerationState getSaml2TokenGenerationState(); OpenIdConnectTokenGenerationState getOpenIdConnectTokenGenerationState(); @Override String toString(); @Override boolean equals(Object other); @Override int hashCode(); JsonValue toJson(); static TokenGenerationServiceInvocationState fromJson(JsonValue json);  }### Answer:
@Test public void testEquals() throws Exception { TokenGenerationServiceInvocationState config1 = buildInvocationState(TokenType.SAML2); TokenGenerationServiceInvocationState config2 = buildInvocationState(TokenType.SAML2); assertEquals(config1, config2); config1 = buildInvocationState(TokenType.OPENIDCONNECT); config2 = buildInvocationState(TokenType.OPENIDCONNECT); assertEquals(config1, config2); config1 = buildInvocationState(TokenType.SAML2); config2 = buildInvocationState(TokenType.OPENIDCONNECT); assertNotEquals(config1, config2); }