@SuppressWarnings("unchecked") private <T> void setupListenerOrdering(IListener<T> listener) { listener.isCallbackOrderingPostreq((T)anyObject(), anyObject(String.class)); expectLastCall().andReturn(false).anyTimes(); listener.isCallbackOrderingPrereq((T)anyObject(), anyObject(String.class)); expectLastCall().andReturn(false).anyTimes(); }
/** * Set up expectations for the callback ordering methods for mocked * listener classes. * * @param listener the mock listener to set up expectations for */ private void setUpNoOrderingRequirements(IListener<OFType> listener) { listener.isCallbackOrderingPostreq(EasyMock.<OFType>anyObject(), anyObject(String.class)); expectLastCall().andReturn(false).anyTimes(); listener.isCallbackOrderingPrereq(EasyMock.<OFType>anyObject(), anyObject(String.class)); expectLastCall().andReturn(false).anyTimes(); }