@SuppressWarnings("unchecked") @Test public void testCreate(@Mocked final MessageProducer<?, ?> mockMessageProducer) { new Expectations() { { new MessageProducer<String, String>(anyString, anyString, anyString, (Properties) any, (Set<String>)any); } }; assertTrue(testSerializableMessageProducerPool.create() instanceof MessageProducer); }
@Override protected MessageProducer<K, V> create() { return new MessageProducer<>(brokers, type, partitionerClass, props, odeProperties.getKafkaTopicsDisabledSet()); }
SerializableMessageProducerPool extends SerializableObjectPool<MessageProducer<K, V>> { @Override protected MessageProducer<K, V> create() { return new MessageProducer<>(brokers, type, partitionerClass, props, odeProperties.getKafkaTopicsDisabledSet()); } }
SerializableMessageProducerPool extends SerializableObjectPool<MessageProducer<K, V>> { @Override protected MessageProducer<K, V> create() { return new MessageProducer<>(brokers, type, partitionerClass, props, odeProperties.getKafkaTopicsDisabledSet()); } SerializableMessageProducerPool(OdeProperties odeProperties); }
SerializableMessageProducerPool extends SerializableObjectPool<MessageProducer<K, V>> { @Override protected MessageProducer<K, V> create() { return new MessageProducer<>(brokers, type, partitionerClass, props, odeProperties.getKafkaTopicsDisabledSet()); } SerializableMessageProducerPool(OdeProperties odeProperties); SerializableMessageProducerPool<K, V> init(); @Override boolean validate(MessageProducer<K, V> o); @Override void expire(MessageProducer<K, V> o); String getBrokers(); void setBrokers(String brokers); String getType(); void setType(String type); Properties getProps(); void setProps(Properties props); String getPartitionerClass(); void setPartitionerClass(String partitionerClass); }
SerializableMessageProducerPool extends SerializableObjectPool<MessageProducer<K, V>> { @Override protected MessageProducer<K, V> create() { return new MessageProducer<>(brokers, type, partitionerClass, props, odeProperties.getKafkaTopicsDisabledSet()); } SerializableMessageProducerPool(OdeProperties odeProperties); SerializableMessageProducerPool<K, V> init(); @Override boolean validate(MessageProducer<K, V> o); @Override void expire(MessageProducer<K, V> o); String getBrokers(); void setBrokers(String brokers); String getType(); void setType(String type); Properties getProps(); void setProps(Properties props); String getPartitionerClass(); void setPartitionerClass(String partitionerClass);  }