@Test public void removeEventTest() { this.info = new DocumentInfo("", "", "", "", 0, 1); this.thread = new DocumentSendThread(receiver, info, project, cache, PATCH_GENERATOR); Mockito.doAnswer(new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { LoggableEvent event = (LoggableEvent) invocation.getArguments()[0]; assertEquals("text_remove", event.getEventType()); return null; } }).when(receiver).receiveEvent(any(LoggableEvent.class)); thread.run(); verify(receiver, times(1)).receiveEvent(any(LoggableEvent.class)); }
@Override public void run() { createAndSendPatch(); }
DocumentSendThread extends Thread { @Override public void run() { createAndSendPatch(); } }
DocumentSendThread extends Thread { @Override public void run() { createAndSendPatch(); } DocumentSendThread(EventReceiver receiver, DocumentInfo info, Project project, Map<String, String> cache,
            diff_match_patch PATCH_GENERATOR); }
DocumentSendThread extends Thread { @Override public void run() { createAndSendPatch(); } DocumentSendThread(EventReceiver receiver, DocumentInfo info, Project project, Map<String, String> cache,
            diff_match_patch PATCH_GENERATOR); @Override void run(); }
DocumentSendThread extends Thread { @Override public void run() { createAndSendPatch(); } DocumentSendThread(EventReceiver receiver, DocumentInfo info, Project project, Map<String, String> cache,
            diff_match_patch PATCH_GENERATOR); @Override void run();  }