@Test public void canConfigureCustomHeaderFormatWithVersion() { StyxHeaderConfig styxHeaderConfig = new StyxHeaderConfig( new StyxHeaderConfig.StyxHeader( null, "{VERSION};{REQUEST_ID};{INSTANCE}"), null, null); Environment environment = environment(new MapBackedConfiguration() .set("styxHeaders", styxHeaderConfig)); String info = new ResponseInfoFormat(environment).format(request); assertThat(info, is("STYX-dev.0.0;" + request.id() + ";noJvmRouteSet")); }
public String format(LiveHttpRequest request) { return String.format(format, request == null ? "" : request.id()); }
ResponseInfoFormat { public String format(LiveHttpRequest request) { return String.format(format, request == null ? "" : request.id()); } }
ResponseInfoFormat { public String format(LiveHttpRequest request) { return String.format(format, request == null ? "" : request.id()); } ResponseInfoFormat(Environment environment); }
ResponseInfoFormat { public String format(LiveHttpRequest request) { return String.format(format, request == null ? "" : request.id()); } ResponseInfoFormat(Environment environment); String format(LiveHttpRequest request); }
ResponseInfoFormat { public String format(LiveHttpRequest request) { return String.format(format, request == null ? "" : request.id()); } ResponseInfoFormat(Environment environment); String format(LiveHttpRequest request);  }