RestBusinessParametersFactory implements BusinessParametersFactory { @Override public BusinessParameters getInstance(Map<String, String> properties) { return getWritableInstance(properties); }  @Override BusinessParameters getInstance(Map<String, String> properties); @Override WritableBusinessParameters getWritableInstance(Map<String, String> properties); static final Set<String> SUPPORTED_WIREFORMATS; }
@Test void getInstance() { BusinessParameters parameters = factory.getInstance(PROPERTIES); assertThat(parameters) .isNotNull() .isInstanceOf(RestBusinessParametersClient.class); }
@Test void getsUrlFromProperties() { BusinessParameters parameters = factory.getInstance(PROPERTIES); verify(clientConstructor).accept(url.capture(), any()); assertThat(url.getValue()).isEqualTo(URL); }
@Test void loadsClientWireFormatters() { registerService(ClientWireFormatterFactory.class, TestClientWireFormatterFactory.class); BusinessParameters parameters = factory.getInstance(PROPERTIES); verify(clientConstructor).accept(any(), context.capture()); assertThat(context.getValue()).isNotNull(); TestClientWireFormatter formatter = context.getValue().getWireFormatter(TestClientWireFormatter.class); assertThat(formatter).isSameAs(TestClientWireFormatterFactory.FORMATTER); }