@Test public void testJobComplete() { AsyncJob<?> job = AsyncJob.builder().id("100") .status(Status.SUCCEEDED).resultCode(ResultCode.SUCCESS).build(); expect((Object) asyncJobClient.getAsyncJob(job.getId())).andReturn(job); replay(client, asyncJobClient); assertTrue(new JobComplete(client).apply(job.getId())); verify(client, asyncJobClient); }
@Inject public JobComplete(CloudStackApi client) { this.client = client; }
JobComplete implements Predicate<String> { @Inject public JobComplete(CloudStackApi client) { this.client = client; } }
JobComplete implements Predicate<String> { @Inject public JobComplete(CloudStackApi client) { this.client = client; } @Inject  JobComplete(CloudStackApi client); }
JobComplete implements Predicate<String> { @Inject public JobComplete(CloudStackApi client) { this.client = client; } @Inject  JobComplete(CloudStackApi client); boolean apply(String jobId); }
JobComplete implements Predicate<String> { @Inject public JobComplete(CloudStackApi client) { this.client = client; } @Inject  JobComplete(CloudStackApi client); boolean apply(String jobId);  }