@Test
public void testPSComponentZeroNumberOfPS() throws IOException {

  testCommons.yarnConfig.set("hadoop.registry.dns.domain-name", "testDomain");
  TensorFlowRunJobParameters parameters = new TensorFlowRunJobParameters();
  parameters.setPsResource(testCommons.resource);
  parameters.setName("testJobName");
  parameters.setPsDockerImage("testPSDockerImage");
  parameters.setNumPS(0);
  TensorFlowPsComponent psComponent =
      createPsComponent(parameters);
  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage("Number of PS should be at least 1!");
  psComponent.createComponent();
}