@Test
public void testFindUpgrade() throws Exception {

  List<UpgradeEntity> items = dao.findUpgrades(clusterId.longValue());
  assertTrue(items.size() > 0);
  UpgradeEntity entity = dao.findUpgrade(items.get(0).getId().longValue());
  assertNotNull(entity);
  assertEquals(1, entity.getUpgradeGroups().size());
  UpgradeGroupEntity group = dao.findUpgradeGroup(
      entity.getUpgradeGroups().get(0).getId().longValue());
  assertNotNull(group);
  Assert.assertNotSame(entity.getUpgradeGroups().get(0), group);
  assertEquals("group_name", group.getName());
  assertEquals("group title", group.getTitle());
}