### Question:
ResponseExpectedRpcListener extends AbstractRpcListener<T> { @Override protected void operationSuccessful() { LOG.debug("Request for {} sent successfully", key); cache.put(key, this); } ResponseExpectedRpcListener(final Object message, final String failureInfo,
            final Cache<RpcResponseKey, ResponseExpectedRpcListener<?>> cache, final RpcResponseKey key); void discard(); @SuppressWarnings("unchecked") void completed(final OfHeader message);  }### Answer:
@Test public void testOperationSuccessful() { RpcResponseKey key = new RpcResponseKey(12345L, BarrierOutput.class.getName()); ResponseExpectedRpcListener<OfHeader> listener = new ResponseExpectedRpcListener<>("MESSAGE", "Failed to send message", responseCache, key); listener.operationSuccessful(); ResponseExpectedRpcListener<?> present = responseCache.getIfPresent(key); Assert.assertEquals(present, listener); }