SPIRoutingHook implements RoutingHook { @Override public void finishSuccess(final RouteContext routeContext, final SchemaMetaData schemaMetaData) { for (RoutingHook each : routingHooks) { each.finishSuccess(routeContext, schemaMetaData); } }  @Override void start(final String sql); @Override void finishSuccess(final RouteContext routeContext, final SchemaMetaData schemaMetaData); @Override void finishFailure(final Exception cause);  }
@Test public void assertFinishSuccess() { spiRoutingHook.finishSuccess(routeContext, schemaMetaData); RoutingHook routingHook = getFixtureHook(); assertThat(routingHook, instanceOf(RoutingHookFixture.class)); assertThat(((RoutingHookFixture) routingHook).getRouteContext(), is(routeContext)); assertThat(((RoutingHookFixture) routingHook).getSchemaMetaData(), is(schemaMetaData)); }