    @Test(expected = IdDoesNotExistException.class)
    public void checkRecordExistsWithWrongIdentifier() throws OaiPmhException {

        Mockito.doThrow(new IdDoesNotExistException("INCORRECT/ID")).when(recordApi).checkRecordExists("INCORRECT/ID");

        recordApi.checkRecordExists("INCORRECT/ID");

        fail(); // should not reach this code
    }