### Question:
Log implements Closeable { <V2 extends Comparable<V2>> K findBoundaryKeyFromRecord(Record.Mapper<V, V2> mapper, V2 limitValue) throws ChangelogException { sharedLock.lock(); try { K key = null; for (LogFile<K, V> logFile : logFiles.values()) { final Record<K, V> record = logFile.getOldestRecord(); final V2 oldestValue = mapper.map(record.getValue()); if (oldestValue.compareTo(limitValue) > 0) { return key; } key = record.getKey(); } return key; } finally { sharedLock.unlock(); } } private  Log(final ReplicationEnvironment replicationEnv, final File logPath, final RecordParser<K, V> parser,
      final LogRotationParameters rotationParams); File getPath(); void append(final Record<K, V> record); void syncToFileSystem(); RepositionableCursor<K, V> getCursor(); RepositionableCursor<K, V> getCursor(final K key); RepositionableCursor<K, V> getCursor(final K key, final KeyMatchingStrategy matchingStrategy,
      final PositionStrategy positionStrategy); Record<K, V> getOldestRecord(); Record<K, V> getNewestRecord(); long getNumberOfRecords(); Record<K,V> purgeUpTo(final K purgeKey); void clear(); @Override void close();  }### Answer:
@Test(dataProvider = "findBoundaryKeyData") public void testFindBoundaryKeyFromRecord(int limitValue, String expectedKey) throws Exception { try (Log<String, String> log = openLog(LogFileTest.RECORD_PARSER)) { assertThat(log.findBoundaryKeyFromRecord(MAPPER, limitValue)).isEqualTo(expectedKey); } }