ApiManager implements IApiManager { @Override public ApiBootstrap createBootstrap(ApiBootstrap bootstrap) throws AmbariApiException { logger.info("Bootstrap hosts:"); logger.info(ApiUtils.objectToJson(bootstrap.getHosts())); Response response = null; try { response = apiResourceRootV1.getBootstrapResource().createBootstrap( ApiUtils.objectToJson(bootstrap)); } catch (Exception e) { throw AmbariApiException.CANNOT_CONNECT_AMBARI_SERVER(e); } String bootstrapJson = handleAmbariResponse(response); logger.debug("Response of bootstrap creation from ambari server:"); logger.debug(bootstrapJson); ApiBootstrap apiBootstrap = ApiUtils.jsonToObject(ApiBootstrap.class, bootstrapJson); return apiBootstrap; } ApiManager(String amServerHost, int port, String user, String password);  ApiManager(URL baseUrl, String user, String password);  ApiManager(AmbariManagerClientbuilder clientbuilder); @Override ApiStackList getStackList(); @Override ApiStack getStack(String stackName); @Override ApiService readService(String clusterName, String serviceName); @Override boolean isServiceStarted(String clusterName, String serviceName); @Override ApiStackVersionList getStackVersionList(String stackName); @Override ApiStackVersion getStackVersion(String stackName, String stackVersion); @Override ApiStackServiceList getStackServiceList(String stackName,
         String stackVersion); @Override ApiStackServiceList getStackServiceListWithComponents(
         String stackName, String stackVersion); @Override ApiStackServiceList getStackServiceListWithConfigurations(
         String stackName, String stackVersion); @Override ApiStackService getStackServiceWithComponents(String stackName,
         String stackVersion, String serviceName); List<ApiConfiguration> getServiceConfiguration(String stackName,
         String stackVersion, String serviceName); @Override ApiStackService getStackService(String stackName,
         String stackVersion, String stackServiceName); @Override ApiStackComponentList getStackComponentList(String stackName,
         String stackVersion, String stackServiceName); @Override ApiStackComponent getStackComponent(String stackName,
         String stackVersion, String stackServiceName, String stackComponentName); @Override ApiClusterList getClusterList(); @Override ApiCluster getCluster(String clusterName); @Override List<ApiService> getClusterServices(String clusterName); @Override ApiRequest stopAllServicesInCluster(String clusterName); @Override ApiRequest startAllServicesInCluster(String clusterName); ApiRequest decommissionComponent(String clusterName, String host, String serviceName, String managementRoleName, String slaveRoleName); @Override List<String> getClusterServicesNames(String clusterName); @Override ApiRequest provisionCluster(String clusterName,
         ApiClusterBlueprint apiClusterBlueprint); @Override ApiBlueprintList getBlueprintList(); @Override ApiBlueprint getBlueprint(String blueprintName); @Override ApiBlueprint createBlueprint(String blueprintName,
         ApiBlueprint apiBlueprint); boolean updatePersist(ApiPersist persist); @Override ApiRequest deleteHost(String clusterName, String fqdn); @Override boolean deleteBlueprint(String blueprintName); @Override boolean deleteCluster(String clusterName); @Override ApiRequestList getRequestList(String clusterName); @Override ApiRequest getRequest(String clusterName, Long requestId); @Override ApiBootstrap createBootstrap(ApiBootstrap bootstrap); @Override ApiBootstrapStatus getBootstrapStatus(Long bootstrapId); @Override ApiRequest getRequestWithTasks(String clusterName, Long requestId); @Override ServiceStatus getClusterStatus(String clusterName, HadoopStack stack); @Override Map<String, ServiceStatus> getHostStatus(String clusterName); @Override ApiHostList getHostsSummaryInfo(String clusterName); List<ApiHostComponent> getHostComponents(String clusterName, String hostName); @Override String healthCheck(); @Override String getVersion(); @Override boolean deleteService(String clusterName, String serviceName); @Override List<String> getExistingHosts(String clusterName,
         List<String> hostNames); @Override void addHostsToCluster(String clusterName, List<String> hostNames); @Override ApiHostList getClusterHostsList(String clusterName); @Override ApiRequest stopAllComponentsInHosts(String clusterName,
         List<String> hostNames); @Override void deleteAllComponents(String clusterName, String hostName); @Override List<String> getAssociatedConfigGroups(String clusterName,
         String hostName); ApiConfigGroupList getConfigGroupsList(String clusterName); @Override void deleteConfigGroup(String clusterName, String groupId); ApiClusterConfigurations getClusterConfigurationsWithTypeAndTag(String clusterName, String type, String tag); @Override ApiRequest startComponents(String clusterName,
         List<String> hostNames, List<String> components); @Override void createConfigGroups(String clusterName,
         List<ApiConfigGroup> configGroups); ApiConfigGroup readConfigGroup(String clusterName, String configGroupId); void updateConfigGroup(String clusterName, String groupId,
         ApiConfigGroup configGroup); @Override void addComponents(String clusterName, List<String> hostNames,
         ApiHostComponentsRequest components); @Override ApiRequest installComponents(String clusterName); @Override ApiStackServiceList getStackWithCompAndConfigs(String stackName,
         String stackVersion); @Override ApiHostList getRegisteredHosts(); @Override ApiStackServiceList getServicesWithFilter(String stackName,
         String stackVersion, String filter); @Override List<ApiRequest> restartRequiredServices(String clusterName); @Override ApiRequest restartRequiredService(String clusterName, ApiRestartRequiredService apiRestartRequiredService); @Override List<ApiRestartRequiredService> getRestartRequiredServices(String clusterName); @Override void setClusterHostsRackInfo(String clusterName, String rackInfo, Set<String> hosts);  }
@Test public void testCreateBootstrap() throws Exception { Assert.assertEquals(clusterName, apiManager.createBlueprint(clusterName, null).getApiBlueprintInfo().getBlueprintName()); }