TravisRestService { public void finish(long buildId) throws Exception { jandyWorker.put(buildId, JandyTask.FINISH, Long.valueOf(buildId)); }  @Transactional void begin(BuildInfo bi); @Transactional Map<String, ?> createProf(ProfilingInfo profParams); void saveProf(ProfilingContext profilingContext); void updateTreeNodes(List<TreeNode> treeNodes); void finish(long buildId);  }
@Test public void testFinish() throws Exception { travisRestService.finish(1L); verify(jandyWorker, times(1)).put(eq(1L), eq(JandyTask.FINISH), eq(Long.valueOf(1L))); }