*
* @throws InterruptedException
*/
@Test
public final void testProcessError() throws InterruptedException {
TInput in = mock(TInput.class);
final One<RejectType> one = One.create(null);
SleepStage ss = new SleepStage("abc", dispatcher){
@Override
public void reject(RejectType type, Object info, Message msg) {
one.a = type;
}
};
when(in.getTag()).thenReturn(65432);
ss.addInput(in);
Thread.sleep(100);
assertEquals(RejectType.PROCESS_ERROR, one.a);
assertEquals(ss.getInputSize(), 0);
ss.shutdown();