  @Test
  public void testDeleteJob() throws Exception {

    JobSpec aJob = getTestJob("Some Job");

    when(jobDao.getJob(aJob.getId())).thenReturn(aJob);
    MockHttpServletRequestBuilder request = delete(String.format("/api/job/%s", aJob.getId()));
    mockMvc.perform(request)
      .andExpect(status().isOk())
      .andExpect(content().string(success));

    verify(jobDao, times(1)).getJob(aJob.getId());
    verify(jobDao, times(1)).deleteJob(aJob.getId());
  }