@Test(expected=InternalServerErrorException.class)
public void verifyExceptionIsThrownWhenFailingToSetDeleteJobParameter() throws Exception {

    UkelonnServiceProvider ukelonn = new UkelonnServiceProvider();
    MockLogService logservice = new MockLogService();
    ukelonn.setLogservice(logservice);
    // Create a mock database that will fail during query setup
    DataSource datasource = mock(DataSource.class);
    Connection connection = mock(Connection.class);
    when(datasource.getConnection()).thenReturn(connection);
    PreparedStatement statement = mock(PreparedStatement.class);
    doThrow(SQLException.class).when(statement).setInt(anyInt(), anyInt());
    when(connection.prepareStatement(anyString())).thenReturn(statement);
    ukelonn.setDataSource(datasource);
    // Create the jersey resource that is to be tested
    AdminJobs resource = new AdminJobs();
    // Inject fake OSGi services
    resource.ukelonn = ukelonn;
    resource.logservice = logservice;
    // trying to delete jobs here will throw a Jersey Internal Error exception
    Account account = getJodAccount();
    List<Integer> idsOfJobsToDelete = Arrays.asList(1);
    AccountWithJobIds accountWithJobIds = new AccountWithJobIds(account, idsOfJobsToDelete);
    resource.delete(accountWithJobIds);
    fail("Should never get here!");
}