@Test
  public void test_create_GatewaySender_ThrowsException_when_GroupTransactionEvents_isTrue_and_BatchConflation_is_enabled() {
    cache = new CacheFactory().set(MCAST_PORT, "0").create();
    GatewaySenderFactory fact = cache.createGatewaySenderFactory();
    fact.setBatchConflationEnabled(true);
    fact.setGroupTransactionEvents(true);
    assertThatThrownBy(() -> fact.create("NYSender", 2))
        .isInstanceOf(GatewaySenderException.class)
        .hasMessageContaining(
            "GatewaySender NYSender cannot be created with both group transaction events set to true and batch conflation enabled");
  }
Test to validate that the sender can not be started without configuring locator
geode-wan/src/integrationTest/java/org/apache/geode/internal/cache/wan/misc/WANConfigurationJUnitTest.java