### Question:
LineLoginResult implements Parcelable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof LineLoginResult)) return false; LineLoginResult that = (LineLoginResult) o; return getResponseCode() == that.getResponseCode() && Objects.equals(getNonce(), that.getNonce()) && Objects.equals(getLineProfile(), that.getLineProfile()) && Objects.equals(getLineIdToken(), that.getLineIdToken()) && Objects.equals(getFriendshipStatusChanged(), that.getFriendshipStatusChanged()) && Objects.equals(getLineCredential(), that.getLineCredential()) && getErrorData().equals(that.getErrorData()); } private  LineLoginResult(final Builder builder); private  LineLoginResult(@NonNull final Parcel in); static LineLoginResult error(@NonNull final LineApiResponseCode resultCode,
                                        @NonNull final LineApiError errorData); static LineLoginResult error(@NonNull final LineApiResponse<?> apiResponse); static LineLoginResult internalError(@NonNull final LineApiError errorData); static LineLoginResult internalError(@NonNull final String errorMessage); static LineLoginResult internalError(@NonNull final Exception e); static LineLoginResult authenticationAgentError(@NonNull final LineApiError errorData); static LineLoginResult canceledError(); @Override int describeContents(); @Override void writeToParcel(final Parcel dest, final int flags); boolean isSuccess(); @NonNull LineApiResponseCode getResponseCode(); @Nullable String getNonce(); @Nullable LineProfile getLineProfile(); @Nullable LineIdToken getLineIdToken(); @NonNull Boolean getFriendshipStatusChanged(); @Nullable LineCredential getLineCredential(); @NonNull LineApiError getErrorData(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final Creator<LineLoginResult> CREATOR; }### Answer:
@Test public void testEquals() { final LineLoginResult expected = loginResultBuilder().build(); assertEquals(expected, loginResultBuilder().build()); assertNotEquals(expected, loginResultBuilder() .responseCode(LineApiResponseCode.CANCEL) .build()); assertNotEquals(expected, loginResultBuilder() .nonce(null) .build()); assertNotEquals(expected, loginResultBuilder() .nonce("differentNonce") .build()); assertNotEquals(expected, loginResultBuilder() .lineProfile(null) .build()); assertNotEquals(expected, loginResultBuilder() .lineProfile( new LineProfile("id2", "displayName", Uri.parse("http: "statusMessage") ) .build()); assertNotEquals(expected, loginResultBuilder() .lineIdToken(null) .build()); assertNotEquals(expected, loginResultBuilder() .lineIdToken( new Builder() .issuer("https: .subject("abcdef") .audience("123456") .issuedAt(now) .expiresAt(oneHourLater) .nonce("qwerty") .name("displayName") .picture("http: .email("user@example.com") .build() ) .build()); assertNotEquals(expected, loginResultBuilder() .friendshipStatusChanged(null) .build()); assertNotEquals(expected, loginResultBuilder() .friendshipStatusChanged(false) .build()); assertNotEquals(expected, loginResultBuilder() .lineCredential(null) .build()); assertNotEquals(expected, loginResultBuilder() .lineCredential( new LineCredential( new LineAccessToken("accessToken-xxx", 1000, 2000), Arrays.asList(Scope.FRIEND, Scope.GROUP, Scope.OPENID_CONNECT, Scope.OC_EMAIL)) ) .build()); assertNotEquals(expected, loginResultBuilder() .errorData(null) .build()); assertNotEquals(expected, loginResultBuilder() .errorData(new LineApiError("testErrorMessage2")) .build()); }