@Test
public void testTensorBoardComponentWithNullResource() throws IOException {

  TensorFlowRunJobParameters parameters = new TensorFlowRunJobParameters();
  parameters.setTensorboardResource(null);
  TensorBoardComponent tensorBoardComponent =
      createTensorBoardComponent(parameters);
  expectedException.expect(NullPointerException.class);
  expectedException.expectMessage("TensorBoard resource must not be null");
  tensorBoardComponent.createComponent();
}