33import io .jooby .ExecutionMode ;
44import io .jooby .Renderer ;
55import io .jooby .Route ;
6+ import io .jooby .internal .handler .CharSequenceHandler ;
67import io .jooby .internal .handler .CompletionStageHandler ;
78import io .jooby .internal .handler .DefaultHandler ;
89import io .jooby .internal .handler .DetachHandler ;
@@ -32,7 +33,7 @@ public class PipelineTest {
3233 public void eventLoopDoesNothingOnSimpleTypes () {
3334 Route .Handler h = ctx -> "OK" ;
3435 ChainedHandler pipeline = pipeline (route (String .class , h ), ExecutionMode .EVENT_LOOP );
35- assertTrue (pipeline instanceof DefaultHandler );
36+ assertTrue (pipeline instanceof CharSequenceHandler , pipeline . toString () );
3637 assertTrue (pipeline .next () == h ,
3738 "found: " + pipeline .next () + ", expected: " + h .getClass ());
3839 }
@@ -45,8 +46,8 @@ public void eventLoopAlwaysDispatchToExecutorOnSimpleTypes() {
4546 ChainedHandler pipeline = pipeline (route (String .class , h ), ExecutionMode .EVENT_LOOP , executor );
4647 assertTrue (pipeline instanceof WorkerExecHandler , "found: " + pipeline );
4748 Route .Handler next = pipeline .next ();
48- assertTrue (next instanceof DefaultHandler );
49- next = ((DefaultHandler ) next ).next ();
49+ assertTrue (next instanceof CharSequenceHandler );
50+ next = ((ChainedHandler ) next ).next ();
5051 assertTrue (next == h , "found: " + next + ", expected: " + h .getClass ());
5152 }
5253
@@ -120,8 +121,8 @@ public void workerDoesNothingOnSimpleTypes() {
120121 ChainedHandler pipeline = pipeline (route (String .class , h ), ExecutionMode .WORKER );
121122 assertTrue (pipeline instanceof WorkerHandler , "found: " + pipeline );
122123 Route .Handler next = pipeline .next ();
123- assertTrue (next instanceof DefaultHandler );
124- next = ((DefaultHandler ) next ).next ();
124+ assertTrue (next instanceof CharSequenceHandler );
125+ next = ((ChainedHandler ) next ).next ();
125126 assertTrue (next == h , "found: " + next + ", expected: " + h .getClass ());
126127 }
127128
@@ -185,8 +186,8 @@ public void workerAlwaysDispatchToExecutorOnSimpleTypes() {
185186 ChainedHandler pipeline = pipeline (route (String .class , h ), ExecutionMode .WORKER , executor );
186187 assertTrue (pipeline instanceof WorkerExecHandler , "found: " + pipeline );
187188 Route .Handler next = pipeline .next ();
188- assertTrue (next instanceof DefaultHandler );
189- next = ((DefaultHandler ) next ).next ();
189+ assertTrue (next instanceof CharSequenceHandler );
190+ next = ((ChainedHandler ) next ).next ();
190191 assertTrue (next == h , "found: " + next + ", expected: " + h .getClass ());
191192 }
192193
0 commit comments