Search in sources :

Example 1 with SubnetFilterStrategy

use of com.sequenceiq.cloudbreak.cloud.aws.common.subnetselector.SubnetFilterStrategy in project cloudbreak by hortonworks.

the class AwsNetworkConnectorTest method prepareMock.

public void prepareMock(List<CloudSubnet> cloudSubnets) {
    Map<SubnetFilterStrategyType, SubnetFilterStrategy> subnetFilterStrategyMap = new HashMap<>();
    subnetFilterStrategyMap.put(SubnetFilterStrategyType.MULTIPLE_PREFER_PRIVATE, subnetFilterStrategy);
    subnetFilterStrategyMap.put(SubnetFilterStrategyType.MULTIPLE_PREFER_PUBLIC, subnetFilterStrategy);
    when(subnetFilterStrategy.filter(any(), anyInt())).thenReturn(new SubnetSelectionResult(cloudSubnets));
    ReflectionTestUtils.setField(underTest, "subnetFilterStrategyMap", subnetFilterStrategyMap);
}
Also used : SubnetFilterStrategyType(com.sequenceiq.cloudbreak.cloud.aws.common.subnetselector.SubnetFilterStrategyType) SubnetFilterStrategy(com.sequenceiq.cloudbreak.cloud.aws.common.subnetselector.SubnetFilterStrategy) HashMap(java.util.HashMap) SubnetSelectionResult(com.sequenceiq.cloudbreak.cloud.model.SubnetSelectionResult)

Aggregations

SubnetFilterStrategy (com.sequenceiq.cloudbreak.cloud.aws.common.subnetselector.SubnetFilterStrategy)1 SubnetFilterStrategyType (com.sequenceiq.cloudbreak.cloud.aws.common.subnetselector.SubnetFilterStrategyType)1 SubnetSelectionResult (com.sequenceiq.cloudbreak.cloud.model.SubnetSelectionResult)1 HashMap (java.util.HashMap)1