clusterEntity.setClusterConfigEntities(Collections.EMPTY_LIST);
//both sides of relation should be set when modifying in runtime
host1.setClusterEntities(Arrays.asList(clusterEntity));
host2.setClusterEntities(Arrays.asList(clusterEntity));
HostStateEntity hostStateEntity1 = new HostStateEntity();
hostStateEntity1.setCurrentState(HostState.HEARTBEAT_LOST);
hostStateEntity1.setHostEntity(host1);
HostStateEntity hostStateEntity2 = new HostStateEntity();
hostStateEntity2.setCurrentState(HostState.HEALTHY);
hostStateEntity2.setHostEntity(host2);
host1.setHostStateEntity(hostStateEntity1);
host2.setHostStateEntity(hostStateEntity2);
ClusterServiceEntity clusterServiceEntity = new ClusterServiceEntity();
clusterServiceEntity.setServiceName("HDFS");