@Test public void testIfRemoteFlagSet() { customizer.enabled.set(true); customizer.customize(); assertThat( fraction.subresources().servers() ).hasSize(1); EnhancedServer server = (EnhancedServer) fraction.subresources().server("default"); assertThat( server ).isNotNull(); assertThat( server.remoteConnections() ).hasSize(1); RemoteConnection connection = server.remoteConnections().get(0); assertThat( connection.name() ).isEqualTo(MessagingProperties.DEFAULT_REMOTE_MQ_NAME ); assertThat( connection.host() ).isEqualTo(MessagingProperties.DEFAULT_REMOTE_HOST); assertThat( connection.port() ).isEqualTo(MessagingProperties.DEFAULT_REMOTE_PORT); assertThat( connection.jndiName() ).isEqualTo(MessagingProperties.DEFAULT_REMOTE_JNDI_NAME); }
@Override public void customize() { if (this.enabled.get()) { fraction.defaultServer((server) -> { server.remoteConnection(name.get(), (connection) -> { connection.jndiName(this.jndiName.get()); connection.host(this.host.get()); connection.port(this.port.get()); }); }); } }
RemoteConnectionInstallingCustomizer implements Customizer { @Override public void customize() { if (this.enabled.get()) { fraction.defaultServer((server) -> { server.remoteConnection(name.get(), (connection) -> { connection.jndiName(this.jndiName.get()); connection.host(this.host.get()); connection.port(this.port.get()); }); }); } } }
RemoteConnectionInstallingCustomizer implements Customizer { @Override public void customize() { if (this.enabled.get()) { fraction.defaultServer((server) -> { server.remoteConnection(name.get(), (connection) -> { connection.jndiName(this.jndiName.get()); connection.host(this.host.get()); connection.port(this.port.get()); }); }); } }  }
RemoteConnectionInstallingCustomizer implements Customizer { @Override public void customize() { if (this.enabled.get()) { fraction.defaultServer((server) -> { server.remoteConnection(name.get(), (connection) -> { connection.jndiName(this.jndiName.get()); connection.host(this.host.get()); connection.port(this.port.get()); }); }); } }  @Override void customize(); }
RemoteConnectionInstallingCustomizer implements Customizer { @Override public void customize() { if (this.enabled.get()) { fraction.defaultServer((server) -> { server.remoteConnection(name.get(), (connection) -> { connection.jndiName(this.jndiName.get()); connection.host(this.host.get()); connection.port(this.port.get()); }); }); } }  @Override void customize();  }