@Test public void testControlGroupWithInvalidGroup() { ControlGroupJvmRequest controlGroupJvmRequest = new ControlGroupJvmRequest(groupId, JvmControlOperation.START); cut.controlGroup(controlGroupJvmRequest, testUser); }
@Transactional @Override public void controlGroup(final ControlGroupJvmRequest controlGroupJvmRequest, final User aUser) { controlGroupJvmRequest.validate(); Group group = groupService.getGroup(controlGroupJvmRequest.getGroupId()); final Set<Jvm> jvms = group.getJvms(); if (jvms != null) { controlJvms(controlGroupJvmRequest, aUser, jvms); } }
GroupJvmControlServiceImpl implements GroupJvmControlService { @Transactional @Override public void controlGroup(final ControlGroupJvmRequest controlGroupJvmRequest, final User aUser) { controlGroupJvmRequest.validate(); Group group = groupService.getGroup(controlGroupJvmRequest.getGroupId()); final Set<Jvm> jvms = group.getJvms(); if (jvms != null) { controlJvms(controlGroupJvmRequest, aUser, jvms); } } }
GroupJvmControlServiceImpl implements GroupJvmControlService { @Transactional @Override public void controlGroup(final ControlGroupJvmRequest controlGroupJvmRequest, final User aUser) { controlGroupJvmRequest.validate(); Group group = groupService.getGroup(controlGroupJvmRequest.getGroupId()); final Set<Jvm> jvms = group.getJvms(); if (jvms != null) { controlJvms(controlGroupJvmRequest, aUser, jvms); } } GroupJvmControlServiceImpl(final GroupService theGroupService, final JvmControlService theJvmControlService); }
GroupJvmControlServiceImpl implements GroupJvmControlService { @Transactional @Override public void controlGroup(final ControlGroupJvmRequest controlGroupJvmRequest, final User aUser) { controlGroupJvmRequest.validate(); Group group = groupService.getGroup(controlGroupJvmRequest.getGroupId()); final Set<Jvm> jvms = group.getJvms(); if (jvms != null) { controlJvms(controlGroupJvmRequest, aUser, jvms); } } GroupJvmControlServiceImpl(final GroupService theGroupService, final JvmControlService theJvmControlService); @Transactional @Override void controlGroup(final ControlGroupJvmRequest controlGroupJvmRequest, final User aUser); @Override void controlAllJvms(final ControlGroupJvmRequest controlGroupJvmRequest, final User user); boolean checkSameState(final JvmControlOperation jvmControlOperation, final JvmState jvmState); }
GroupJvmControlServiceImpl implements GroupJvmControlService { @Transactional @Override public void controlGroup(final ControlGroupJvmRequest controlGroupJvmRequest, final User aUser) { controlGroupJvmRequest.validate(); Group group = groupService.getGroup(controlGroupJvmRequest.getGroupId()); final Set<Jvm> jvms = group.getJvms(); if (jvms != null) { controlJvms(controlGroupJvmRequest, aUser, jvms); } } GroupJvmControlServiceImpl(final GroupService theGroupService, final JvmControlService theJvmControlService); @Transactional @Override void controlGroup(final ControlGroupJvmRequest controlGroupJvmRequest, final User aUser); @Override void controlAllJvms(final ControlGroupJvmRequest controlGroupJvmRequest, final User user); boolean checkSameState(final JvmControlOperation jvmControlOperation, final JvmState jvmState);  }