@Test
public void testGetHostComponentStateEntities() throws Exception {

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