expect(server.getName()).andStubReturn(serverName);
Job job = createMock(Job.class);
expect(job.getCurrentState()).andReturn(JobState.SUCCEEDED);
GridJobApi client = createMock(GridJobApi.class);
expect(client.getJobList(latestJobForObjectByName(serverName))).andReturn(ImmutableSet.<Job> of(job));
replay(job);
replay(client);
replay(server);