@Test
public void testGetClusterNodeLabels() throws Exception {

  when(client.getClusterNodeLabels()).thenReturn(
      Arrays.asList(NodeLabel.newInstance("label1"),
          NodeLabel.newInstance("label2")));
  ClusterCLI cli = createAndGetClusterCLI();
  
  int rc =
      cli.run(new String[] { ClusterCLI.CMD, "-" + ClusterCLI.LIST_LABELS_CMD });
  assertEquals(0, rc);
  
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  PrintWriter pw = new PrintWriter(baos);
  pw.print("Node Labels: <label1:exclusivity=true>,<label2:exclusivity=true>");
  pw.close();
  verify(sysOut).println(baos.toString("UTF-8"));
}