pk.setComponentName(sch1.getServiceComponentName());
pk.setServiceName(sch1.getServiceName());
pk.setHostName(hostName);
HostComponentDesiredStateDAO dao = injector.getInstance(HostComponentDesiredStateDAO.class);
HostComponentDesiredStateEntity entity = dao.findByPK(pk);
Assert.assertEquals(MaintenanceState.OFF, entity.getMaintenanceState());
Assert.assertEquals(MaintenanceState.OFF, sch1.getMaintenanceState());
sch1.setMaintenanceState(MaintenanceState.ON);
Assert.assertEquals(MaintenanceState.ON, sch1.getMaintenanceState());