@Test public void test_should_return_false_when_logged_in_user_is_same_as_user_being_updated() { User user = User.builder() .id(1L) .loggedInUserId(1L) .build(); assertFalse(user.isLoggedInUserDifferentFromUpdatedUser()); }
public boolean isLoggedInUserDifferentFromUpdatedUser() { return !id.equals(loggedInUserId); }
User { public boolean isLoggedInUserDifferentFromUpdatedUser() { return !id.equals(loggedInUserId); } }
User { public boolean isLoggedInUserDifferentFromUpdatedUser() { return !id.equals(loggedInUserId); }  }
User { public boolean isLoggedInUserDifferentFromUpdatedUser() { return !id.equals(loggedInUserId); }  User addAddressItem(Address addressItem); User addRolesItem(Role roleItem); void validateNewUser(); void validateUserModification(); boolean isCorrespondenceAddressInvalid(); boolean isPermanentAddressInvalid(); boolean isOtpReferenceAbsent(); boolean isTypeAbsent(); boolean isActiveIndicatorAbsent(); boolean isMobileNumberAbsent(); boolean isNameAbsent(); boolean isUsernameAbsent(); boolean isTenantIdAbsent(); boolean isPasswordAbsent(); boolean isRolesAbsent(); boolean isIdAbsent(); void nullifySensitiveFields(); boolean isLoggedInUserDifferentFromUpdatedUser(); void setRoleToCitizen(); void updatePassword(String newPassword); OtpValidationRequest getOtpValidationRequest(); List<Address> getPermanentAndCorrespondenceAddresses(); void setDefaultPasswordExpiry(int expiryInDays); void setActive(boolean isActive); }
User { public boolean isLoggedInUserDifferentFromUpdatedUser() { return !id.equals(loggedInUserId); }  User addAddressItem(Address addressItem); User addRolesItem(Role roleItem); void validateNewUser(); void validateUserModification(); boolean isCorrespondenceAddressInvalid(); boolean isPermanentAddressInvalid(); boolean isOtpReferenceAbsent(); boolean isTypeAbsent(); boolean isActiveIndicatorAbsent(); boolean isMobileNumberAbsent(); boolean isNameAbsent(); boolean isUsernameAbsent(); boolean isTenantIdAbsent(); boolean isPasswordAbsent(); boolean isRolesAbsent(); boolean isIdAbsent(); void nullifySensitiveFields(); boolean isLoggedInUserDifferentFromUpdatedUser(); void setRoleToCitizen(); void updatePassword(String newPassword); OtpValidationRequest getOtpValidationRequest(); List<Address> getPermanentAndCorrespondenceAddresses(); void setDefaultPasswordExpiry(int expiryInDays); void setActive(boolean isActive);  }