@Test
public void testSimpleDistributedTFConfigGeneratorWorker() {

  String json = TensorFlowConfigEnvGenerator.getTFConfigEnv("worker", 5, 3,
          "wtan", "tf-job-001", "example.com");
  assertEquals(json, "{\\\"cluster\\\":{\\\"master\\\":[\\\"master-0.wtan" +
      ".tf-job-001.example.com:8000\\\"],\\\"worker\\\":[\\\"worker-0.wtan" +
      ".tf-job-001.example.com:8000\\\",\\\"worker-1.wtan.tf-job-001" +
      ".example.com:8000\\\",\\\"worker-2.wtan.tf-job-001.example" +
      ".com:8000\\\",\\\"worker-3.wtan.tf-job-001.example.com:8000\\\"]," +
      "\\\"ps\\\":[\\\"ps-0.wtan.tf-job-001.example.com:8000\\\",\\\"ps-1" +
      ".wtan.tf-job-001.example.com:8000\\\",\\\"ps-2.wtan.tf-job-001" +
      ".example.com:8000\\\"]},\\\"task\\\":{ \\\"type\\\":\\\"worker\\\", " +
      "\\\"index\\\":$_TASK_INDEX},\\\"environment\\\":\\\"cloud\\\"}");
}