TransformedRecordSerializer implements RecordSerializer<M> { public static Builder<Message> newDefaultBuilder() { return newBuilder(DynamicMessageRecordSerializer.instance()); } protected  TransformedRecordSerializer(@Nonnull RecordSerializer<M> inner,
                                          boolean compressWhenSerializing,
                                          int compressionLevel,
                                          boolean encryptWhenSerializing); @Nonnull @Override byte[] serialize(@Nonnull RecordMetaData metaData,
                            @Nonnull RecordType recordType,
                            @Nonnull M record,
                            @Nullable StoreTimer timer); @Nonnull @Override @SuppressWarnings("PMD.PreserveStackTrace") M deserialize(@Nonnull RecordMetaData metaData,
                         @Nonnull Tuple primaryKey,
                         @Nonnull byte[] serialized,
                         @Nullable StoreTimer timer); @Nonnull @Override RecordSerializer<Message> widen(); static Builder<Message> newDefaultBuilder(); static Builder<M> newBuilder(@Nonnull RecordSerializer<M> inner);  }
@Test public void buildWithoutSettingEncryption() { assertThrows(RecordCoreArgumentException.class, () -> TransformedRecordSerializer.newDefaultBuilder().setEncryptWhenSerializing(true).build()); }