/* -- Sample tests -- */
 @Test
 public void testSampleName() throws Exception {
   final String name = "SomeSamples";
   ProfileCollector collector = getCollector(serverNode);
   ProfileConsumer cons1 = collector.getConsumer("c1");
   ProfileSample sample1 = cons1.registerSampleSource(name, true, -1, ProfileLevel.MAX);
   assertEquals(name, sample1.getSampleName());
 }
  @Test
  public void testSampleType() throws Exception {
    ProfileCollector collector = getCollector(serverNode);
    ProfileConsumer cons1 = collector.getConsumer("c1");
    ProfileSample s1 = cons1.registerSampleSource("samples", true, -1, ProfileLevel.MAX);

    assertTrue(s1.isTaskLocal());

    ProfileSample s2 = cons1.registerSampleSource("other", false, -1, ProfileLevel.MAX);
    assertFalse(s2.isTaskLocal());
  }