AmbariImpl spy = Mockito.spy(provider);
Mockito.when(spy.echo()).thenReturn(true);
Mockito.when(spy.isProvisioned(Mockito.anyString())).thenReturn(true);
Mockito.doReturn(true).when(spy).isClusterProvisionedByBDE(Mockito.<AmClusterDef>any());
Mockito.doReturn(false).when(spy).onStopCluster(Mockito.<ClusterBlueprint>any(), Mockito.<ClusterReportQueue>any());
ApiManager apiManager = new FakeApiManager(makeClientBuilder());
ApiManager backup = spy.getApiManager();
spy.setApiManager(apiManager);
Assert.assertTrue(spy.onDeleteCluster(blueprint, reportQueue));
spy.setApiManager(backup);
}