SystemCommandStateBean { @Transactional(REQUIRES_NEW) public void addSystemCommandState(final SystemCommandStatus systemCommandStatus) { systemCommandStatusRepository.add(systemCommandStatus); }  @Transactional(REQUIRES_NEW) void addSystemCommandState(final SystemCommandStatus systemCommandStatus); @Transactional(REQUIRES_NEW) Optional<SystemCommandStatus> getCommandStatus(final UUID commandId); @Transactional(REQUIRES_NEW) boolean commandInProgress(final SystemCommand systemCommand);  }
@Test public void shouldAddSystemCommandStatusToTheRepository() throws Exception { final SystemCommandStatus systemCommandStatus = mock(SystemCommandStatus.class); systemCommandStateBean.addSystemCommandState(systemCommandStatus); verify(systemCommandStatusRepository).add(systemCommandStatus); }