Search in sources :

Example 1 with RegionProducer

use of org.apache.camel.component.openstack.keystone.producer.RegionProducer in project camel by apache.

the class RegionProducerTest method setUp.

@Before
public void setUp() {
    producer = new RegionProducer(endpoint, client);
    when(regionService.create(any(Region.class))).thenReturn(testOSregion);
    when(regionService.get(anyString())).thenReturn(testOSregion);
    List<Region> getAllList = new ArrayList<>();
    getAllList.add(testOSregion);
    getAllList.add(testOSregion);
    doReturn(getAllList).when(regionService).list();
    dummyRegion = createRegion();
    when(testOSregion.getDescription()).thenReturn(dummyRegion.getDescription());
}
Also used : ArrayList(java.util.ArrayList) Region(org.openstack4j.model.identity.v3.Region) RegionProducer(org.apache.camel.component.openstack.keystone.producer.RegionProducer) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)1 RegionProducer (org.apache.camel.component.openstack.keystone.producer.RegionProducer)1 Before (org.junit.Before)1 Region (org.openstack4j.model.identity.v3.Region)1