@Test
public void testFix() {

    UcteNode node = createNode();
    node.setTypeCode(UcteNodeTypeCode.UT);
    node.setTypeCode(UcteNodeTypeCode.UT);
    node.setMinimumPermissibleActivePowerGeneration(-1000.0f);
    node.setMaximumPermissibleActivePowerGeneration(1000.0f);
    node.setMinimumPermissibleReactivePowerGeneration(-2000.0f);
    node.setMaximumPermissibleReactivePowerGeneration(2000.0f);
    node.fix();
    assertEquals(1000.0f, node.getMinimumPermissibleActivePowerGeneration(), 0.0f);
    assertEquals(-1000.0f, node.getMaximumPermissibleActivePowerGeneration(), 0.0f);
    assertEquals(2000.0f, node.getMinimumPermissibleReactivePowerGeneration(), 0.0f);
    assertEquals(-2000.0f, node.getMaximumPermissibleReactivePowerGeneration(), 0.0f);
    node = createNode();
    node.setTypeCode(UcteNodeTypeCode.UT);
    node.setActivePowerGeneration(10.0f);
    node.setReactivePowerGeneration(10.0f);
    node.setMinimumPermissibleActivePowerGeneration(0.0f);
    node.setMinimumPermissibleReactivePowerGeneration(0.0f);
    node.fix();
    assertEquals(node.getActivePowerGeneration(), node.getMinimumPermissibleActivePowerGeneration(), 0.0f);
    assertEquals(node.getReactivePowerGeneration(), node.getMinimumPermissibleReactivePowerGeneration(), 0.0f);
    node = createNode();
    node.setTypeCode(UcteNodeTypeCode.UT);
    node.setActivePowerGeneration(0.0f);
    node.setReactivePowerGeneration(0.0f);
    node.setMaximumPermissibleActivePowerGeneration(10.0f);
    node.setMaximumPermissibleReactivePowerGeneration(10.0f);
    node.fix();
    assertEquals(node.getActivePowerGeneration(), node.getMaximumPermissibleActivePowerGeneration(), 0.0f);
    assertEquals(node.getReactivePowerGeneration(), node.getMaximumPermissibleReactivePowerGeneration(), 0.0f);
    node = createNode();
    node.setTypeCode(UcteNodeTypeCode.UT);
    node.setReactivePowerGeneration(0.0f);
    node.setMinimumPermissibleReactivePowerGeneration(0.0f);
    node.setMaximumPermissibleReactivePowerGeneration(0.0f);
    node.fix();
    assertEquals(9999.0f, node.getMinimumPermissibleReactivePowerGeneration(), 0.0f);
    assertEquals(-9999.0f, node.getMaximumPermissibleReactivePowerGeneration(), 0.0f);
    node.setTypeCode(UcteNodeTypeCode.UT);
    node.setReactivePowerGeneration(0.0f);
    node.setMinimumPermissibleReactivePowerGeneration(10000.0f);
    node.setMaximumPermissibleReactivePowerGeneration(-10000.0f);
    node.fix();
}