@Test
public void testIsGenerator() {

    UcteNode node = createNode();
    assertFalse(node.isGenerator());
    node.setTypeCode(UcteNodeTypeCode.UT);
    assertTrue(node.isGenerator());
    node.setTypeCode(UcteNodeTypeCode.PQ);
    assertFalse(node.isGenerator());
    node.setActivePowerGeneration(1000.0f);
    assertTrue(node.isGenerator());
    node.setActivePowerGeneration(Float.NaN);
    assertFalse(node.isGenerator());
    node.setReactivePowerGeneration(1000.0f);
    assertTrue(node.isGenerator());
    node.setReactivePowerGeneration(Float.NaN);
    assertFalse(node.isGenerator());
    node.setMinimumPermissibleActivePowerGeneration(1000.0f);
    node.setMaximumPermissibleActivePowerGeneration(1000.0f);
    assertFalse(node.isGenerator());
    node.setMinimumPermissibleActivePowerGeneration(-1000.0f);
    assertTrue(node.isGenerator());
    node.setMinimumPermissibleActivePowerGeneration(Float.NaN);
    node.setMaximumPermissibleActivePowerGeneration(Float.NaN);
    assertFalse(node.isGenerator());
    node.setMinimumPermissibleReactivePowerGeneration(1000.0f);
    node.setMaximumPermissibleReactivePowerGeneration(1000.0f);
    assertFalse(node.isGenerator());
    node.setMinimumPermissibleReactivePowerGeneration(-1000.0f);
    assertTrue(node.isGenerator());
    node.setMinimumPermissibleReactivePowerGeneration(Float.NaN);
    node.setMaximumPermissibleReactivePowerGeneration(Float.NaN);
    assertFalse(node.isGenerator());
}