コード例 #1
0
 @Test
 public void testProcessReply() {
   Error mockedError = mock(Error.class);
   deviceContext.processReply(mockedError);
   verify(messageIntelligenceAgency)
       .spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_FAILURE));
   OfHeader mockedOfHeader = mock(OfHeader.class);
   deviceContext.processReply(mockedOfHeader);
   verify(messageIntelligenceAgency)
       .spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS));
 }
コード例 #2
0
 @Test
 public void testProcessReply2() {
   MultipartReply mockedMultipartReply = mock(MultipartReply.class);
   Xid dummyXid = new Xid(DUMMY_XID);
   deviceContext.processReply(dummyXid, Lists.newArrayList(mockedMultipartReply));
   verify(messageIntelligenceAgency)
       .spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_FAILURE));
 }