@SuppressWarnings({ "rawtypes", "unchecked" }) @Test public void testValidateTrue(@Injectable MessageProducer mockMessageProducer, @Mocked Producer<?, ?> mockProducer) { new Expectations() { { mockMessageProducer.getProducer(); result = mockProducer; } }; assertTrue(testSerializableMessageProducerPool.validate(mockMessageProducer)); }
@Override public boolean validate(MessageProducer<K, V> o) { return o.getProducer() != null; }
SerializableMessageProducerPool extends SerializableObjectPool<MessageProducer<K, V>> { @Override public boolean validate(MessageProducer<K, V> o) { return o.getProducer() != null; } }
SerializableMessageProducerPool extends SerializableObjectPool<MessageProducer<K, V>> { @Override public boolean validate(MessageProducer<K, V> o) { return o.getProducer() != null; } SerializableMessageProducerPool(OdeProperties odeProperties); }
SerializableMessageProducerPool extends SerializableObjectPool<MessageProducer<K, V>> { @Override public boolean validate(MessageProducer<K, V> o) { return o.getProducer() != null; } 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 public boolean validate(MessageProducer<K, V> o) { return o.getProducer() != null; } 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);  }