### Question:
RecordHandler { public @NonNull ProducerRecord<RecordId, Record> transform(final @NonNull Record record) { final RecordConfig config = getRecordConfig(record); return new ProducerRecord<>( config.getTopic(), new RecordId(record.getPartitionId(), record.getPosition()), record); } RecordHandler(final @NonNull RecordsConfig configuration); @NonNull ProducerRecord<RecordId, Record> transform(final @NonNull Record record); boolean test(final @NonNull Record record);  }### Answer:
@Test public void shouldTransformRecord() { final Record<DeploymentRecordValue> record = buildDeploymentRecord().recordType(RecordType.COMMAND).build(); final RecordConfig deploymentRecordConfig = new RecordConfig(EnumSet.allOf(RecordType.class), "topic"); final RecordHandler recordHandler = new RecordHandler(newRecordsConfig(RecordType.COMMAND)); final ProducerRecord<RecordId, Record> transformed = recordHandler.transform(record); assertThat(transformed.topic()).isEqualTo(deploymentRecordConfig.getTopic()); assertThat(transformed.key()) .isEqualTo(new RecordId(record.getPartitionId(), record.getPosition())); assertThat(transformed.value()).isEqualTo(record); }