@Test
public void testAddHostComponentDesiredStateEntity() throws Exception {

  HostEntity hostEntity = new HostEntity();
  HostComponentDesiredStateEntity stateEntity = new HostComponentDesiredStateEntity();
  hostEntity.setHostComponentDesiredStateEntities(new HashSet<HostComponentDesiredStateEntity>());
  Collection<HostComponentDesiredStateEntity> stateEntities = hostEntity.getHostComponentDesiredStateEntities();
  assertTrue(stateEntities.isEmpty());
  hostEntity.addHostComponentDesiredStateEntity(stateEntity);
  stateEntities = hostEntity.getHostComponentDesiredStateEntities();
  assertTrue(stateEntities.contains(stateEntity));
}