@Test
public void testSucceededAppsSubmitted() {

  long totalGoodBefore = metrics.getNumSucceededAppsSubmitted();
  goodSubCluster.submitApplication(100);
  Assert.assertEquals(totalGoodBefore + 1,
      metrics.getNumSucceededAppsSubmitted());
  Assert.assertEquals(100, metrics.getLatencySucceededAppsSubmitted(), 0);
  goodSubCluster.submitApplication(200);
  Assert.assertEquals(totalGoodBefore + 2,
      metrics.getNumSucceededAppsSubmitted());
  Assert.assertEquals(150, metrics.getLatencySucceededAppsSubmitted(), 0);
}