@Test
public void testAMSimulator() throws Exception {

  // Register one app
  MockAMSimulator app = new MockAMSimulator();
  String appId = "app1";
  String queue = "default";
  List<ContainerSimulator> containers = new ArrayList<>();
  HashMap<ApplicationId, AMSimulator> map = new HashMap<>();
  app.init(1000, containers, rm, null, 0, 1000000L, "user1", queue, true,
      appId, 0, SLSConfiguration.getAMContainerResource(conf), null, null,
      map);
  app.firstStep();
  verifySchedulerMetrics(appId);
  Assert.assertEquals(1, rm.getRMContext().getRMApps().size());
  Assert.assertNotNull(rm.getRMContext().getRMApps().get(app.appId));
  // Finish this app
  app.lastStep();
}