NumberOfNodesBasedConfig implements RelationshipGeneratorConfig { @Override public boolean isValid() { return numberOfNodes >= 2; } NumberOfNodesBasedConfig(int numberOfNodes); @Override int getNumberOfNodes(); @Override boolean isValid();  }
@Test public void shouldCorrectlyEvaluateValidConfig() { assertFalse(new NumberOfNodesBasedConfig(-1).isValid()); assertFalse(new NumberOfNodesBasedConfig(0).isValid()); assertFalse(new NumberOfNodesBasedConfig(1).isValid()); assertTrue(new NumberOfNodesBasedConfig(3).isValid()); assertTrue(new NumberOfNodesBasedConfig(5).isValid()); assertTrue(new NumberOfNodesBasedConfig(Integer.MAX_VALUE - 1).isValid()); assertTrue(new NumberOfNodesBasedConfig(Integer.MAX_VALUE).isValid()); assertFalse(new NumberOfNodesBasedConfig(Integer.MAX_VALUE + 1).isValid()); }