### Question:
DBRecordProvider extends BaseProvider implements RecordProvider, ConnectionPoolListener { @Override public void checkRecordExists(String id) throws OaiPmhException { String recordId = prepareRecordId(id); FullBean bean = getFullBean(recordId); if (bean == null) { throw new IdDoesNotExistException("Record with identifier " + id + " not found!"); } }  @Override void connectionPoolOpened(ConnectionPoolOpenedEvent connectionPoolOpenedEvent); @Override void connectionPoolClosed(ConnectionPoolClosedEvent connectionPoolClosedEvent); @Override void connectionCheckedOut(ConnectionCheckedOutEvent connectionCheckedOutEvent); @Override void connectionCheckedIn(ConnectionCheckedInEvent connectionCheckedInEvent); @Override void waitQueueEntered(ConnectionPoolWaitQueueEnteredEvent connectionPoolWaitQueueEnteredEvent); @Override void waitQueueExited(ConnectionPoolWaitQueueExitedEvent connectionPoolWaitQueueExitedEvent); @Override synchronized void connectionAdded(ConnectionAddedEvent connectionAddedEvent); @Override synchronized void connectionRemoved(ConnectionRemovedEvent connectionRemovedEvent); @Override @TrackTime Record getRecord(String id); @Override void checkRecordExists(String id); @TrackTime String getEDM(RDF rdf); @TrackTime RDF getRDF(FullBeanImpl bean); @Override ListRecords listRecords(List<Header> identifiers); @Override @PreDestroy void close();  }### Answer:
@Test public void checkRecordExists() throws EuropeanaException, OaiPmhException { FullBeanImpl bean = mock(FullBeanImpl.class); given(mongoServer.getFullBean(anyString())).willReturn(bean); recordProvider.checkRecordExists(TEST_RECORD_ID); }