/** Test the counter that increments job failures. */
 @Test
 public void testFailedJobCounter() {
   // incr failed jobs once
   stats.setGenieFailedJobs(new AtomicLong(0));
   stats.incrGenieFailedJobs();
   Assert.assertEquals(stats.getGenieFailedJobs().longValue(), 1L);
 }
 /** Test the counter that increments job submissions. */
 @Test
 public void testJobSubCounter() {
   // incr job submissions once
   stats.setGenieJobSubmissions(new AtomicLong(0));
   stats.incrGenieJobSubmissions();
   Assert.assertEquals(stats.getGenieJobSubmissions().longValue(), 1L);
 }
 /** Test the counter that increments job kills. */
 @Test
 public void testKilledJobCounter() {
   // incr killed jobs twice
   stats.setGenieKilledJobs(new AtomicLong(0));
   stats.incrGenieKilledJobs();
   stats.incrGenieKilledJobs();
   Assert.assertEquals(stats.getGenieKilledJobs().longValue(), 2L);
 }
 /** Test the counter that increments 200 error codes (success). */
 @Test
 public void test2xxCounter() {
   // incr 2xx count twice
   stats.setGenie2xxCount(new AtomicLong(0));
   stats.incrGenie2xxCount();
   stats.incrGenie2xxCount();
   System.out.println("Received: " + stats.getGenie2xxCount().longValue());
   Assert.assertEquals(stats.getGenie2xxCount().longValue(), 2L);
 }
 /** Test the counter that increments job success. */
 @Test
 public void testSuccessJobCounter() {
   // incr successful jobs thrice
   stats.setGenieSuccessfulJobs(new AtomicLong(0));
   stats.incrGenieSuccessfulJobs();
   stats.incrGenieSuccessfulJobs();
   stats.incrGenieSuccessfulJobs();
   Assert.assertEquals(stats.getGenieSuccessfulJobs().longValue(), 3L);
 }
 /** Initialize stats object before any tests are run. */
 @BeforeClass
 public static void init() {
   stats = GenieNodeStatistics.getInstance();
 }
 /** Shutdown stats object after test is done. */
 @AfterClass
 public static void shutdown() {
   // shut down cleanly
   stats.shutdown();
 }