@Test
public void testConnectVoltageRegulatorOff() {

    g2.setVoltageRegulatorOn(false);
    GeneratorUtil.connectGenerator(g2);
    assertTrue(g2.getTerminal().isConnected());
    assertEquals(22., g2.getTargetV(), 0.01);
}