clusterServiceEntity.setServiceName("HDFS");
clusterServiceEntity.setClusterEntity(clusterEntity);
clusterServiceEntity.setServiceComponentDesiredStateEntities(
Collections.EMPTY_LIST);
clusterServiceEntity.setServiceConfigMappings(Collections.EMPTY_LIST);
ServiceDesiredStateEntity stateEntity = mock(ServiceDesiredStateEntity.class);
Gson gson = new Gson();
when(stateEntity.getDesiredStackVersion()).thenReturn(gson.toJson(new StackId("HDP-2.0.5"),
StackId.class));
clusterServiceEntity.setServiceDesiredStateEntity(stateEntity);
List<ClusterServiceEntity> clusterServiceEntities = new ArrayList<ClusterServiceEntity>();
clusterServiceEntities.add(clusterServiceEntity);
clusterEntity.setClusterServiceEntities(clusterServiceEntities);