### Question:
OIDCCredentials { public String serialize() { try { final JSONObject jsonCredential = new JSONObject().put("authState", this.authState.jsonSerializeString()); return jsonCredential.toString(); } catch (JSONException e) { throw new IllegalStateException(e); } } OIDCCredentials(final String serialisedCredential);  OIDCCredentials(); String getAccessToken(); String getIdentityToken(); String getRefreshToken(); AuthState getAuthState(); boolean verifyClaims(final JsonWebKeySet jwks,
                    final KeycloakConfiguration keycloakConfig); boolean isExpired(); boolean getNeedsRenewal(); void setNeedsRenewal(); boolean isAuthorized(); String serialize(); static OIDCCredentials deserialize(final String serializedCredential); boolean checkValidAuth(); boolean renew(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testSerialize() throws JSONException { OIDCCredentials testCredential = new OIDCCredentials(CREDENTIAL_AUTH_STATE); JSONObject serializedCredential = new JSONObject(testCredential.serialize()); assertEquals(serializedCredential.get("authState"), CREDENTIAL_AUTH_STATE); }