ShouldForkResult { public static ShouldForkResult shouldNotForkResult(String reason) { return new ShouldForkResult(false, reason); } private  ShouldForkResult(boolean shouldFork, String reason); static ShouldForkResult shouldForkResult(); static ShouldForkResult shouldNotForkResult(String reason); ShouldForkResult and(ShouldForkResult otherShouldForkResult); boolean isForkable(); String getReason(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String NO_REASON; }
@Test public void testNotEqual() { assertNotEquals(shouldNotForkResult("another"), shouldNotForkResult("test")); }
@Test(dataProvider = "shouldNotForkReasons") public void testShouldNotForkResult(String reason) { ShouldForkResult shouldForkResult = shouldNotForkResult(reason); assertFalse(shouldForkResult.isForkable()); assertEquals(shouldForkResult.getReason(), reason); }