@Test
public void setHasValue() {

    DependencyGraph dependencyGraph = new DependencyGraph(COMPOSITE_MODULE, new BitSet());
    InPortNode inPortNode = dependencyGraph.inPortNodes().get(0);
    Assert.assertEquals(inPortNode.getHasValue(), DependencyGraph.HasValue.UNKNOWN);
    inPortNode.setHasValue(DependencyGraph.HasValue.UNKNOWN);
    Assert.assertEquals(inPortNode.getHasValue(), DependencyGraph.HasValue.UNKNOWN);
    inPortNode.setHasValue(DependencyGraph.HasValue.PENDING_VALUE_CHECK);
    inPortNode.setHasValue(DependencyGraph.HasValue.PENDING_VALUE_CHECK);
    try {
        inPortNode.setHasValue(DependencyGraph.HasValue.UNKNOWN);
        Assert.fail();
    } catch (IllegalArgumentException ignore) { }
    Assert.assertEquals(inPortNode.getHasValue(), DependencyGraph.HasValue.PENDING_VALUE_CHECK);
    inPortNode.setHasValue(DependencyGraph.HasValue.HAS_VALUE);
    try {
        inPortNode.setHasValue(DependencyGraph.HasValue.UNKNOWN);
        Assert.fail();
    } catch (IllegalArgumentException ignore) { }
    try {
        inPortNode.setHasValue(DependencyGraph.HasValue.PENDING_VALUE_CHECK);
        Assert.fail();
    } catch (IllegalArgumentException ignore) { }
    try {
        inPortNode.setHasValue(DependencyGraph.HasValue.NO_VALUE);
        Assert.fail();
    } catch (IllegalArgumentException ignore) { }
}