@Test
public void testGetHostComponentDesiredStateEntities() throws Exception {

  HostEntity hostEntity = new HostEntity();
  HostComponentDesiredStateEntity stateEntity = new HostComponentDesiredStateEntity();
  hostEntity.setHostComponentDesiredStateEntities(new HashSet<HostComponentDesiredStateEntity>());
  Collection<HostComponentDesiredStateEntity> stateEntities = hostEntity.getHostComponentDesiredStateEntities();
  assertTrue(stateEntities.isEmpty());
  try {
    stateEntities.add(stateEntity);
    fail("Expected UnsupportedOperationException");
  } catch (UnsupportedOperationException e) {
    // expected
  }
}