@Test
public void testRestartApp() throws Exception {

  String id = "application 1";
  AppDetailsController ac = Mockito.mock(AppDetailsController.class);
  Service yarnfile = new Service();
  Component comp = new Component();
  Container c = new Container();
  c.setId("container-1");
  List<Container> containers = new ArrayList<Container>();
  containers.add(c);
  comp.setContainers(containers);
  yarnfile.addComponent(comp);
  Response expected = Response.ok().build();
  when(ac.restartApp(id)).thenReturn(Response.ok().build());
  final Response actual = ac.restartApp(id);
  assertEquals(expected.getStatus(), actual.getStatus());
}