JsonBodyFilters { @API(status = EXPERIMENTAL) public static BodyFilter replaceJsonNumberProperty( final Set<String> properties, final Number replacement) { return replaceJsonNumberProperty(properties::contains, replacement); } private  JsonBodyFilters(); @API(status = MAINTAINED) static BodyFilter accessToken(); @API(status = MAINTAINED) static BodyFilter replaceJsonStringProperty(
            final Set<String> properties, final String replacement); @API(status = EXPERIMENTAL) static BodyFilter replaceJsonStringProperty(
            final Predicate<String> predicate, final String replacement); @API(status = EXPERIMENTAL) static BodyFilter replaceJsonNumberProperty(
            final Set<String> properties, final Number replacement); @API(status = EXPERIMENTAL) static BodyFilter replaceJsonNumberProperty(
            final Predicate<String> predicate, final Number replacement); @API(status = EXPERIMENTAL) static BodyFilter replacePrimitiveJsonProperty(
            final Predicate<String> predicate, final String replacement);  }
@Test void shouldFilterNumberProperty() { final BodyFilter unit = replaceJsonNumberProperty( singleton("foo"), 0); final String actual = unit.filter( contentType, "{\"foo\":99.8,\"bar\":\"public\"}"); assertThat(actual, is("{\"foo\":0,\"bar\":\"public\"}")); }