JobMetaService { public void releaseRunLock(final String jobType) { jobMetaRepository.clearRunningJob(jobType); } @Autowired  JobMetaService(final JobMetaRepository jobMetaRepository,
                          final JobMutexGroups mutexGroups); void aquireRunLock(final String jobId, final String jobType); void releaseRunLock(final String jobType); Set<RunningJob> runningJobs(); void disable(final String jobType, final String comment); void enable(final String jobType); JobMeta getJobMeta(final String jobType);  }
@Test public void shouldReleaseRunLock() { jobMetaService.releaseRunLock("someType"); verify(jobMetaRepository).clearRunningJob("someType"); }