use of org.apache.camel.component.openstack.neutron.producer.SubnetProducer in project camel by apache.
the class SubnetProducerTest method setUp.
@Before
public void setUp() {
producer = new SubnetProducer(endpoint, client);
when(subnetService.create(any(Subnet.class))).thenReturn(testOSsubnet);
when(subnetService.get(anyString())).thenReturn(testOSsubnet);
List<Subnet> getAllList = new ArrayList<>();
getAllList.add(testOSsubnet);
getAllList.add(testOSsubnet);
doReturn(getAllList).when(subnetService).list();
dummySubnet = createSubnet();
when(testOSsubnet.getName()).thenReturn(dummySubnet.getName());
when(testOSsubnet.getNetworkId()).thenReturn(dummySubnet.getNetworkId());
when(testOSsubnet.getId()).thenReturn(UUID.randomUUID().toString());
}
Aggregations