@Test public void should_convert_threaddump() { LegacyEndpointConverter converter = LegacyEndpointConverters.threaddump(); assertThat(converter.canConvert("threaddump")).isTrue(); assertThat(converter.canConvert("foo")).isFalse(); Flux<DataBuffer> legacyInput = this.read("threaddump-legacy.json"); Flux<Object> converted = converter.convert(legacyInput).transform(this::unmarshal); Flux<Object> expected = this.read("threaddump-expected.json").transform(this::unmarshal); StepVerifier.create(Flux.zip(converted, expected)) .assertNext(t -> assertThat(t.getT1()).isEqualTo(t.getT2())) .verifyComplete(); }
public static LegacyEndpointConverter threaddump() { return new LegacyEndpointConverter(Endpoint.THREADDUMP, convertUsing(RESPONSE_TYPE_LIST, RESPONSE_TYPE_MAP, LegacyEndpointConverters::convertThreaddump)); }
LegacyEndpointConverters { public static LegacyEndpointConverter threaddump() { return new LegacyEndpointConverter(Endpoint.THREADDUMP, convertUsing(RESPONSE_TYPE_LIST, RESPONSE_TYPE_MAP, LegacyEndpointConverters::convertThreaddump)); } }
LegacyEndpointConverters { public static LegacyEndpointConverter threaddump() { return new LegacyEndpointConverter(Endpoint.THREADDUMP, convertUsing(RESPONSE_TYPE_LIST, RESPONSE_TYPE_MAP, LegacyEndpointConverters::convertThreaddump)); } private  LegacyEndpointConverters(); }
LegacyEndpointConverters { public static LegacyEndpointConverter threaddump() { return new LegacyEndpointConverter(Endpoint.THREADDUMP, convertUsing(RESPONSE_TYPE_LIST, RESPONSE_TYPE_MAP, LegacyEndpointConverters::convertThreaddump)); } private  LegacyEndpointConverters(); static LegacyEndpointConverter health(); static LegacyEndpointConverter env(); static LegacyEndpointConverter httptrace(); static LegacyEndpointConverter threaddump(); static LegacyEndpointConverter liquibase(); static LegacyEndpointConverter flyway(); static LegacyEndpointConverter info(); }
LegacyEndpointConverters { public static LegacyEndpointConverter threaddump() { return new LegacyEndpointConverter(Endpoint.THREADDUMP, convertUsing(RESPONSE_TYPE_LIST, RESPONSE_TYPE_MAP, LegacyEndpointConverters::convertThreaddump)); } private  LegacyEndpointConverters(); static LegacyEndpointConverter health(); static LegacyEndpointConverter env(); static LegacyEndpointConverter httptrace(); static LegacyEndpointConverter threaddump(); static LegacyEndpointConverter liquibase(); static LegacyEndpointConverter flyway(); static LegacyEndpointConverter info();  }