geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewayReceiverCommandDUnitTest.java
@Test
  public void testCreateGatewayReceiverWithMultipleGatewayTransportFilters() {
    VM puneLocator = Host.getLocator();
    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
    propsSetUp(dsIdPort);
    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));

    vm3.invoke(() -> createCache(dsIdPort));
    vm4.invoke(() -> createCache(dsIdPort));
    vm5.invoke(() -> createCache(dsIdPort));

    String command = CliStrings.CREATE_GATEWAYRECEIVER + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__BINDADDRESS + "=localhost" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__STARTPORT + "=10000" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT + "=11000" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS + "=100000" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE + "=512000" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER
        + "=org.apache.geode.cache30.MyGatewayTransportFilter1,org.apache.geode.cache30.MyGatewayTransportFilter2";
    executeCommandAndVerifyStatus(command, 4);
    List<String> transportFilters = new ArrayList<String>();
    transportFilters.add("org.apache.geode.cache30.MyGatewayTransportFilter1");
    transportFilters.add("org.apache.geode.cache30.MyGatewayTransportFilter2");

    vm3.invoke(() -> verifyReceiverCreationWithAttributes(!GatewayReceiver.DEFAULT_MANUAL_START,
        10000, 11000, "localhost", 100000, 512000, transportFilters,
        GatewayReceiver.DEFAULT_HOSTNAME_FOR_SENDERS));
    vm4.invoke(() -> verifyReceiverCreationWithAttributes(!GatewayReceiver.DEFAULT_MANUAL_START,
        10000, 11000, "localhost", 100000, 512000, transportFilters,
        GatewayReceiver.DEFAULT_HOSTNAME_FOR_SENDERS));
    vm5.invoke(() -> verifyReceiverCreationWithAttributes(!GatewayReceiver.DEFAULT_MANUAL_START,
        10000, 11000, "localhost", 100000, 512000, transportFilters,
        GatewayReceiver.DEFAULT_HOSTNAME_FOR_SENDERS));
  }
/**
   * GatewayReceiver with given attributes and multiple GatewayTransportFilters.
   */
GatewayReceiver with given attributes and multiple GatewayTransportFilters.
GatewayReceiver with given attributes and multiple GatewayTransportFilters .
@Test
  public void testCreateGatewayReceiverWithMultipleGatewayTransportFilters() {
    VM puneLocator = Host.getLocator();
    int dsIdPort = puneLocator.invoke(this::getLocatorPort);
    propsSetUp(dsIdPort);
    vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
    vm3.invoke(() -> createCache(dsIdPort));
    vm4.invoke(() -> createCache(dsIdPort));
    vm5.invoke(() -> createCache(dsIdPort));
    String command = CliStrings.CREATE_GATEWAYRECEIVER + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__BINDADDRESS + "=localhost" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__STARTPORT + "=10000" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT + "=11000" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS + "=100000" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE + "=512000" + " --"
        + CliStrings.CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER
        + "=org.apache.geode.cache30.MyGatewayTransportFilter1,org.apache.geode.cache30.MyGatewayTransportFilter2";
    executeCommandAndVerifyStatus(command, 4);
    List<String> transportFilters = new ArrayList<String>();
    transportFilters.add("org.apache.geode.cache30.MyGatewayTransportFilter1");
    transportFilters.add("org.apache.geode.cache30.MyGatewayTransportFilter2");
    vm3.invoke(() -> verifyReceiverCreationWithAttributes(!GatewayReceiver.DEFAULT_MANUAL_START,
        10000, 11000, "localhost", 100000, 512000, transportFilters,
        GatewayReceiver.DEFAULT_HOSTNAME_FOR_SENDERS));
    vm4.invoke(() -> verifyReceiverCreationWithAttributes(!GatewayReceiver.DEFAULT_MANUAL_START,
        10000, 11000, "localhost", 100000, 512000, transportFilters,
        GatewayReceiver.DEFAULT_HOSTNAME_FOR_SENDERS));
    vm5.invoke(() -> verifyReceiverCreationWithAttributes(!GatewayReceiver.DEFAULT_MANUAL_START,
        10000, 11000, "localhost", 100000, 512000, transportFilters,
        GatewayReceiver.DEFAULT_HOSTNAME_FOR_SENDERS));
  }
@ Test public void testCreateGatewayReceiverWithMultipleGatewayTransportFilters ( ) { VM puneLocator = Host . getLocator ( ) ; int dsIdPort = puneLocator . invoke ( this :: getLocatorPort ) ; propsSetUp ( dsIdPort ) ; vm2 . invoke ( ( ) -> createFirstRemoteLocator ( 2 , dsIdPort ) ) ; vm3 . invoke ( ( ) -> createCache ( dsIdPort ) ) ; vm4 . invoke ( ( ) -> createCache ( dsIdPort ) ) ; vm5 . invoke ( ( ) -> createCache ( dsIdPort ) ) ; String command = CliStrings . CREATE_GATEWAYRECEIVER + " --" + CliStrings . CREATE_GATEWAYRECEIVER__BINDADDRESS + "=localhost" + " --" + CliStrings . CREATE_GATEWAYRECEIVER__STARTPORT + "=10000" + " --" + CliStrings . CREATE_GATEWAYRECEIVER__ENDPORT + "=11000" + " --" + CliStrings . CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS + "=100000" + " --" + CliStrings . CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE + "=512000" + " --" + CliStrings . CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER + "=org.apache.geode.cache30.MyGatewayTransportFilter1,org.apache.geode.cache30.MyGatewayTransportFilter2" ; executeCommandAndVerifyStatus ( command , 4 ) ; List < String > transportFilters = new ArrayList < String > ( ) ; transportFilters . add ( "org.apache.geode.cache30.MyGatewayTransportFilter1" ) ; transportFilters . add ( "org.apache.geode.cache30.MyGatewayTransportFilter2" ) ; vm3 . invoke ( ( ) -> verifyReceiverCreationWithAttributes ( ! GatewayReceiver . DEFAULT_MANUAL_START , 10000 , 11000 , "localhost" , 100000 , 512000 , transportFilters , GatewayReceiver . DEFAULT_HOSTNAME_FOR_SENDERS ) ) ; vm4 . invoke ( ( ) -> verifyReceiverCreationWithAttributes ( ! GatewayReceiver . DEFAULT_MANUAL_START , 10000 , 11000 , "localhost" , 100000 , 512000 , transportFilters , GatewayReceiver . DEFAULT_HOSTNAME_FOR_SENDERS ) ) ; vm5 . invoke ( ( ) -> verifyReceiverCreationWithAttributes ( ! GatewayReceiver . DEFAULT_MANUAL_START , 10000 , 11000 , "localhost" , 100000 , 512000 , transportFilters , GatewayReceiver . DEFAULT_HOSTNAME_FOR_SENDERS ) ) ; }
GatewayReceiver with given attributes and multiple GatewayTransportFilters.
GatewayReceiver with given attributes and multiple GatewayTransportFilters .