@Test public void testValidationListenerWithOnlyRecordCountValidator() { createHollowProducerAndRunCycle("MovieWithPrimaryKey", false); assertOnValidationStatus(1, true); // Expecting only record count validator status ValidationResult validatorStatus = validationListener.getStatus().getResults().get(0); Assert.assertNotNull(validatorStatus); // ValidationStatus builds record validator status based toString of RecordCountValidatorStatus for now. Assert.assertEquals(ValidationResultType.PASSED, validatorStatus.getResultType()); Assert.assertNull(validatorStatus.getThrowable()); // Record count validator would have skipped validation because the previous record count is 0 in this test. // But that status for now is only passed as string through toString method of the validator. Assert.assertTrue(validatorStatus.getMessage().contains("MovieWithPrimaryKey")); Assert.assertTrue(validatorStatus.getMessage().contains("Previous record count is 0")); // Check details Assert.assertTrue(validatorStatus.getName().startsWith(RecordCountVarianceValidator.class.getName())); Assert.assertEquals("MovieWithPrimaryKey", validatorStatus.getDetails().get("Typename")); Assert.assertEquals("3.0", validatorStatus.getDetails().get("AllowableVariancePercent")); }