OfframpServiceFactory { public OfframpService create( String version, RoadConsumer consumer, MessageFunction messageFunction, EventSender sender, StreamMetrics metrics) throws Exception { switch (OfframpVersion.fromString(version)) { case OFFRAMP_2: return serviceV2Factory.create(consumer, messageFunction, sender, metrics); default: throw new Exception("Unknown OfframpVersion " + version); } }  OfframpService create(
      String version,
      RoadConsumer consumer,
      MessageFunction messageFunction,
      EventSender sender,
      StreamMetrics metrics);  }
@Test public void create() throws Exception { String offrampVersion = "2"; OfframpService serviceOut = serviceFactory.create(offrampVersion, any(), any(), any(), any()); assertThat(serviceOut, is(serviceV2)); }