package com.epam.rft.atsy.service.passwordchange.validation.impl;

import com.epam.rft.atsy.service.domain.PasswordChangeDTO;
import com.epam.rft.atsy.service.passwordchange.validation.PasswordValidationRule;
import org.apache.commons.lang3.StringUtils;

public class PasswordAllFieldFilledRule implements PasswordValidationRule {
  private static final String MESSAGE_KEY = "passwordchange.validation.allfieldfilled";

  @Override
  public boolean isValid(PasswordChangeDTO passwordChangeDTO) {
    String newPassword = passwordChangeDTO.getNewPassword();

    return StringUtils.isNotBlank(newPassword) &&
        StringUtils.isNotBlank(newPassword) &&
        StringUtils.isNotBlank(newPassword);
  }

  @Override
  public String getErrorMessageKey() {
    return MESSAGE_KEY;
  }
}

@@ -549,16 +549,152 @@
 sword();
+%0A    String oldPassword = passwordChangeDTO.getOldPassword();%0A    String newPasswordConfirm = passwordChangeDTO.getNewPasswordConfirm();
 %0A%0A    re
@@ -760,35 +760,35 @@
 tils.isNotBlank(
-new
+old
 Password) &&%0A   
@@ -826,16 +826,23 @@
 Password
+Confirm
 );%0A  %7D%0A%0A

Fix isValid return statement logic