BodyFilters { @API(status = EXPERIMENTAL) public static BodyFilter oauthRequest() { final Set<String> properties = new HashSet<>(); properties.add("client_secret"); properties.add("password"); return replaceFormUrlEncodedProperty(properties, "XXX"); } private  BodyFilters(); @API(status = MAINTAINED) static BodyFilter defaultValue(); @API(status = EXPERIMENTAL) static BodyFilter oauthRequest(); @API(status = EXPERIMENTAL) static BodyFilter replaceFormUrlEncodedProperty(final Set<String> properties, final String replacement); @API(status = EXPERIMENTAL) static BodyFilter truncate(final int maxSize); @API(status = EXPERIMENTAL) static BodyFilter compactXml();  }
@Test void wontFilterClientSecretInTextPlainByOauthRequestFilter() { final BodyFilter unit = oauthRequest(); final String actual = unit.filter("text/plain", "client_secret=secret"); assertThat(actual, is("client_secret=secret")); }