@Test
public void createJobInjectsFederatedStackName() {

    Cell firstCell = cells.get(0);
    CellWithCachedJobsService cachedJobsService = new CellWithCachedJobsService(firstCell.getName());
    cellToServiceMap.get(firstCell).getServiceRegistry().addService(cachedJobsService);
    // Create the job and let it get routed
    JobDescriptor jobDescriptor = JobDescriptor.newBuilder()
            .setApplicationName("app1")
            .setCapacityGroup("app1CapGroup")
            .build();
    String jobId = service.createJob(jobDescriptor, JobManagerConstants.UNDEFINED_CALL_METADATA).toBlocking().first();
    Optional<JobDescriptor> createdJob = cachedJobsService.getCachedJob(jobId);
    assertThat(createdJob).isPresent();
    assertThat(createdJob.get().getAttributesMap()).containsEntry(JOB_ATTRIBUTES_STACK, stackName);
}