use of com.sequenceiq.cloudbreak.converter.v4.stacks.StackToStackV4ResponseConverter in project cloudbreak by hortonworks.
the class StackToStackV4ResponseConverterTest method setUp.
@Before
public void setUp() throws CloudbreakImageNotFoundException {
underTest = new StackToStackV4ResponseConverter();
MockitoAnnotations.initMocks(this);
when(imageService.getImage(anyLong())).thenReturn(new Image("cb-centos66-amb200-2015-05-25", Collections.emptyMap(), "redhat6", "redhat6", "", "default", "default-id", new HashMap<>()));
when(componentConfigProviderService.getCloudbreakDetails(anyLong())).thenReturn(new CloudbreakDetails("version"));
when(componentConfigProviderService.getStackTemplate(anyLong())).thenReturn(new StackTemplate("{}", "version"));
when(componentConfigProviderService.getTelemetry(anyLong())).thenReturn(new Telemetry());
Mockito.doAnswer(answer -> {
StackV4Response result = answer.getArgument(1, StackV4Response.class);
result.setSharedService(new SharedServiceV4Response());
return null;
}).when(datalakeService).addSharedServiceResponse(any(Stack.class), any(StackV4Response.class));
when(serviceEndpointCollector.filterByStackType(any(StackType.class), any(List.class))).thenReturn(new ArrayList());
credentialResponse = new CredentialResponse();
credentialResponse.setName("cred-name");
credentialResponse.setCrn("crn");
when(loadBalancerService.findByStackId(any())).thenReturn(Set.of());
}
Aggregations