@Test
public void basicGetYARNProtocol() throws Exception {

  ViewContext viewContext = getViewContext(new HashMap<String, String>());
  AmbariApi ambariApi = createNiceMock(AmbariApi.class);
  Cluster cluster = createNiceMock(Cluster.class);
  expect(ambariApi.isClusterAssociated()).andReturn(true).anyTimes();
  setClusterExpectationWithEmptyWebappConfig(cluster, "HTTP_ONLY");
  expect(viewContext.getCluster()).andReturn(cluster).anyTimes();
  Services services = new Services(ambariApi, viewContext);
  replayAll();
  assertEquals("http", services.getYARNProtocol());
}