@Test public void testValidacao() { PisPasepValidator validator = new PisPasepValidator(); PowerMock.mockStatic(PISPASEP.class); EasyMock.expect(PISPASEP.isValido(EasyMock.anyObject(String.class))).andReturn(true); PowerMock.replay(PISPASEP.class); Assert.assertTrue(validator.isValid("12312312312", null)); PowerMock.verify(PISPASEP.class); }
@Override public boolean isValid(String pis, final ConstraintValidatorContext context) { boolean result = false; if ( pis == null || "".equals(pis) ) { result = true; } else { result = PISPASEP.isValido(pis); } return result; }
PisPasepValidator implements ConstraintValidator<PisPasep, String> { @Override public boolean isValid(String pis, final ConstraintValidatorContext context) { boolean result = false; if ( pis == null || "".equals(pis) ) { result = true; } else { result = PISPASEP.isValido(pis); } return result; } }
PisPasepValidator implements ConstraintValidator<PisPasep, String> { @Override public boolean isValid(String pis, final ConstraintValidatorContext context) { boolean result = false; if ( pis == null || "".equals(pis) ) { result = true; } else { result = PISPASEP.isValido(pis); } return result; }  }
PisPasepValidator implements ConstraintValidator<PisPasep, String> { @Override public boolean isValid(String pis, final ConstraintValidatorContext context) { boolean result = false; if ( pis == null || "".equals(pis) ) { result = true; } else { result = PISPASEP.isValido(pis); } return result; }  @Override void initialize(final PisPasep constraintAnnotation); @Override boolean isValid(String pis, final ConstraintValidatorContext context); }
PisPasepValidator implements ConstraintValidator<PisPasep, String> { @Override public boolean isValid(String pis, final ConstraintValidatorContext context) { boolean result = false; if ( pis == null || "".equals(pis) ) { result = true; } else { result = PISPASEP.isValido(pis); } return result; }  @Override void initialize(final PisPasep constraintAnnotation); @Override boolean isValid(String pis, final ConstraintValidatorContext context);  }