@Test(expected = AmbariApiException.class)
public void shouldCheckForEmptyYarnRMUrlInCustomConfig() {

  ViewContext viewContext = getViewContext(new HashMap<String, String>());
  AmbariApi ambariApi = createNiceMock(AmbariApi.class);
  expect(ambariApi.isClusterAssociated()).andReturn(false);
  replay(viewContext);
  Services services = new Services(ambariApi, viewContext);
  services.getRMUrl();
}