@Test public void getRoutableAddress () { doReturn(null, "private").when(awsEC2Container).getPrivateAddress(); doReturn("public").when(awsEC2Container).getPublicAddress(); doReturn(true, false).when(awsEC2Platform).isAddressRoutable("private"); assertEquals("Null private address, should revert to public", "public", awsEC2Container.getRoutableAddress()); verify(awsEC2Platform, never()).isAddressRoutable(any()); assertEquals("Routable private address, should be private", "private", awsEC2Container.getRoutableAddress()); assertEquals("Unroutable private address, should be private", "public", awsEC2Container.getRoutableAddress()); }
public String getRoutableAddress () { return (getPrivateAddress() != null && awsEC2Platform.isAddressRoutable(getPrivateAddress())) ? getPrivateAddress() : getPublicAddress(); }
AwsEC2Container extends AwsContainer { public String getRoutableAddress () { return (getPrivateAddress() != null && awsEC2Platform.isAddressRoutable(getPrivateAddress())) ? getPrivateAddress() : getPublicAddress(); } }
AwsEC2Container extends AwsContainer { public String getRoutableAddress () { return (getPrivateAddress() != null && awsEC2Platform.isAddressRoutable(getPrivateAddress())) ? getPrivateAddress() : getPublicAddress(); } private  AwsEC2Container(); }
AwsEC2Container extends AwsContainer { public String getRoutableAddress () { return (getPrivateAddress() != null && awsEC2Platform.isAddressRoutable(getPrivateAddress())) ? getPrivateAddress() : getPublicAddress(); } private  AwsEC2Container(); static AwsEC2ContainerBuilder builder(); String getInstanceId(); String getGroupIdentifier(); String getKeyName(); String getName(); boolean isSSHCapable(); String getImageId(); @Override Platform getPlatform(); @Override boolean eligibleForExperiments(); @Override String getSimpleName(); @Override String getAggregationIdentifier(); @Override DataDogIdentifier getDataDogIdentifier(); @Override boolean isCattle(); @Override boolean supportsShellBasedExperiments(); @ChaosExperiment(experimentType = ExperimentType.STATE) void stopContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void restartContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE, experimentScope = ExperimentScope.CATTLE) void terminateASGContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.NETWORK) void removeSecurityGroups(Experiment experiment); String getRoutableAddress(); String getPublicAddress(); }
AwsEC2Container extends AwsContainer { public String getRoutableAddress () { return (getPrivateAddress() != null && awsEC2Platform.isAddressRoutable(getPrivateAddress())) ? getPrivateAddress() : getPublicAddress(); } private  AwsEC2Container(); static AwsEC2ContainerBuilder builder(); String getInstanceId(); String getGroupIdentifier(); String getKeyName(); String getName(); boolean isSSHCapable(); String getImageId(); @Override Platform getPlatform(); @Override boolean eligibleForExperiments(); @Override String getSimpleName(); @Override String getAggregationIdentifier(); @Override DataDogIdentifier getDataDogIdentifier(); @Override boolean isCattle(); @Override boolean supportsShellBasedExperiments(); @ChaosExperiment(experimentType = ExperimentType.STATE) void stopContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void restartContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE, experimentScope = ExperimentScope.CATTLE) void terminateASGContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.NETWORK) void removeSecurityGroups(Experiment experiment); String getRoutableAddress(); String getPublicAddress();  }