### Question:
DefaultProducerFactory implements ProducerFactory<K, V> { public static <K, V> Builder<K, V> builder() { return new Builder<>(); } @SuppressWarnings("WeakerAccess") protected  DefaultProducerFactory(Builder<K, V> builder); static Builder<K, V> builder(); @Override Producer<K, V> createProducer(); @Override ConfirmationMode confirmationMode(); Map<String, Object> configurationProperties(); String transactionIdPrefix(); @Override void shutDown();  }### Answer:
@Test void testConfiguringInvalidCacheSize() { assertThrows( AxonConfigurationException.class, () -> builder().configuration(minimal(kafkaBroker)).producerCacheSize(-1).build() ); }
@Test void testConfiguringInvalidTimeout() { assertThrows( AxonConfigurationException.class, () -> builder().configuration(minimal(kafkaBroker)).closeTimeout(-1, ChronoUnit.SECONDS).build() ); }
@Test void testConfiguringInvalidTimeoutUnit() { assertThrows( AxonConfigurationException.class, () -> builder().configuration(minimal(kafkaBroker)).closeTimeout(1, null).build() ); }
@Test void testConfiguringInvalidCloseTimeout() { assertThrows( AxonConfigurationException.class, () -> builder().configuration(minimal(kafkaBroker)).closeTimeout(Duration.ofSeconds(-1)).build() ); }
@Test void testConfiguringInvalidTransactionalIdPrefix() { assertThrows( AxonConfigurationException.class, () -> builder().transactionalIdPrefix(null).build() ); }