### Question:
ChildRepository implements Repository<Child> { @Override public boolean exists(String childId) { @Cleanup Cursor cursor = session.rawQuery("SELECT child_json FROM children WHERE id = ?", new String[]{childId == null ? "" : childId}); return cursor.moveToNext() && cursor.getCount() > 0; } @Inject  ChildRepository(@Named("USER_NAME") String userName, DatabaseSession session, RapidFtrApplication applicationInstance); @Override Child get(String id); @Override boolean exists(String childId); @Override int size(); @Override List<Child> getRecordsBetween(int fromPageNumber, int pageNumber); @Override List<Child> allCreatedByCurrentUser(); @Override List<Child> getRecordsForFirstPage(); @Override ArrayList<String> getRecordIdsByOwner(); void deleteChildrenByOwner(); @Override void createOrUpdate(Child child); @Override void createOrUpdateWithoutHistory(Child child); @Override List<Child> toBeSynced(); @Override List<Child> currentUsersUnsyncedRecords(); @Override // TODO remove this method - we no longer want to work out what to updateWithoutHistory by comparing _revs HashMap<String, String> getAllIdsAndRevs(); @Override void close(); List<Child> getChildrenByIds(ArrayList<String> listOfIds); List<Child> getAllWithInternalIds(List<String> internalIds); List<Child> getFirstPageOfChildrenMatchingString(String searchKey); List<Child> getChildrenMatchingStringBetween(
            String searchKey, int fromPageNumber, int toPageNumber);  }### Answer:
@Test public void shouldReturnTrueWhenAChildWithTheGivenIdExistsInTheDatabase() { assertThat(repository.exists("1234"), is(false)); }