@Test public void emptyKeyShouldEmitSuccessfully() throws Exception { ActivationKey key = TestUtil.createActivationKey(new Owner("deadbeef"), null); eventSinkImpl.emitActivationKeyCreated(key); eventSinkImpl.sendEvents(); verify(mockClientProducer).send(any(ClientMessage.class)); }
@Test public void keyWithPoolsShouldEmitSuccessfully() throws Exception { ArrayList<Pool> pools = new ArrayList<Pool>(); pools.add(TestUtil.createPool(o, TestUtil.createProduct(o))); pools.add(TestUtil.createPool(o, TestUtil.createProduct(o))); ActivationKey key = TestUtil.createActivationKey(new Owner("deadbeef"), pools); eventSinkImpl.emitActivationKeyCreated(key); eventSinkImpl.sendEvents(); verify(mockClientProducer).send(any(ClientMessage.class)); }