@Test public void test_attach_stripe_ok() throws IOException { nodeContext1.getStripe().setName("stripe2"); DynamicConfigService mock10 = dynamicConfigServiceMock("localhost", 9410); DynamicConfigService mock11 = dynamicConfigServiceMock("localhost", 9411); AttachCommand command = newCommand(); command.setSourceAddress(createUnresolved("localhost", 9411)); command.setOperationType(STRIPE); command.setDestinationAddress(createUnresolved("localhost", 9410)); command.run(); verify(mock10).setUpcomingCluster(newCluster.capture()); verify(mock11).setUpcomingCluster(newCluster.capture()); List<Cluster> allValues = newCluster.getAllValues(); assertThat(allValues, hasSize(2)); assertThat(allValues.get(0), is(equalTo(allValues.get(1)))); Testing.replaceUIDs(allValues.get(0)); assertThat( objectMapper.writeValueAsString(allValues.get(0)), allValues.get(0), is(equalTo(objectMapper.readValue(getClass().getResource("/cluster2.json"), Cluster.class)))); Cluster cluster = allValues.get(0); assertThat(cluster.getStripes(), hasSize(2)); assertThat(cluster.getStripes().get(0).getNodes(), hasSize(1)); assertThat(cluster.getStripes().get(1).getNodes(), hasSize(1)); assertThat(cluster.getNodes(), hasSize(2)); }
public void setSourceAddress(InetSocketAddress sourceAddress) { this.sourceAddress = sourceAddress; }
AttachCommand extends TopologyCommand { public void setSourceAddress(InetSocketAddress sourceAddress) { this.sourceAddress = sourceAddress; } }
AttachCommand extends TopologyCommand { public void setSourceAddress(InetSocketAddress sourceAddress) { this.sourceAddress = sourceAddress; }  }
AttachCommand extends TopologyCommand { public void setSourceAddress(InetSocketAddress sourceAddress) { this.sourceAddress = sourceAddress; }  void setSourceAddress(InetSocketAddress sourceAddress); void setRestartWaitTime(Measure<TimeUnit> restartWaitTime); void setRestartDelay(Measure<TimeUnit> restartDelay); @Override void validate(); }
AttachCommand extends TopologyCommand { public void setSourceAddress(InetSocketAddress sourceAddress) { this.sourceAddress = sourceAddress; }  void setSourceAddress(InetSocketAddress sourceAddress); void setRestartWaitTime(Measure<TimeUnit> restartWaitTime); void setRestartDelay(Measure<TimeUnit> restartDelay); @Override void validate();  }