@Test
public void testWorkerComponentWithNullJobName() throws IOException {

  TensorFlowRunJobParameters parameters = new TensorFlowRunJobParameters();
  parameters.setWorkerResource(testCommons.resource);
  parameters.setNumWorkers(1);
  parameters.setName(null);
  TensorFlowWorkerComponent workerComponent =
      createWorkerComponent(parameters);
  expectedException.expect(NullPointerException.class);
  expectedException.expectMessage("Job name must not be null");
  workerComponent.createComponent();
}