@Test
public void dispatchProcessing_selectionBlock_shouldWork() throws Exception {

    PowerMock.mockStatic(BlockVisualizer.class);
    expect(BlockVisualizer.annotateBlocks((PDDocument) anyObject(), EasyMock.<File>anyObject(), EasyMock.<Document>anyObject(),
            anyBoolean(), anyBoolean(), anyBoolean())).andReturn(null);
    File fakeFile = File.createTempFile("justForTheTest", "baomiao");
    fakeFile.deleteOnExit();
    expect(documentSourceMock.getXmlFile()).andReturn(fakeFile);
    PowerMock.replay(BlockVisualizer.class);
    replay(documentSourceMock);
    target.dispatchProcessing(GrobidRestUtils.Annotation.BLOCK,
            null, documentSourceMock, null);
    PowerMock.verify(BlockVisualizer.class);
    verify(documentSourceMock);
}