use of org.apache.camel.component.openstack.keystone.producer.UserProducer in project camel by apache.
the class UserProducerTest method setUp.
@Before
public void setUp() {
producer = new UserProducer(endpoint, client);
when(userService.create(any(User.class))).thenReturn(testOSuser);
when(userService.get(anyString())).thenReturn(testOSuser);
List<User> getAllList = new ArrayList<>();
getAllList.add(testOSuser);
getAllList.add(testOSuser);
doReturn(getAllList).when(userService).list();
dummyUser = createUser();
when(testOSuser.getName()).thenReturn(dummyUser.getName());
when(testOSuser.getDescription()).thenReturn(dummyUser.getDescription());
when(testOSuser.getPassword()).thenReturn(dummyUser.getPassword());
when(testOSuser.getDomainId()).thenReturn(dummyUser.getDomainId());
when(testOSuser.getEmail()).thenReturn(dummyUser.getEmail());
}
Aggregations