@Test
public void checkGenerators() {

    // active power should be equal to setpoint
    assertTrue(GeneratorsValidation.INSTANCE.checkGenerators(generator, strictConfig, NullWriter.NULL_WRITER));
    Mockito.when(genTerminal.getP()).thenReturn(-39.8);
    assertFalse(GeneratorsValidation.INSTANCE.checkGenerators(generator, strictConfig, NullWriter.NULL_WRITER));
    // the unit is disconnected
    Mockito.when(genBusView.getBus()).thenReturn(null);
    assertTrue(GeneratorsValidation.INSTANCE.checkGenerators(generator, strictConfig, NullWriter.NULL_WRITER));
}