@Test void apply_withNullSkips() { RequestEncoder encoder = new StringEncoder(); RequestSpecification requestSpecification = mock(RequestSpecification.class); encoder.apply(null, requestSpecification); verifyZeroInteractions(requestSpecification); }
@Override public void apply(Object content, RequestSpecification requestSpecification) { if (content != null) { requestSpecification.content(content.toString().getBytes(StandardCharsets.UTF_8)); } }
StringEncoder implements RequestEncoder { @Override public void apply(Object content, RequestSpecification requestSpecification) { if (content != null) { requestSpecification.content(content.toString().getBytes(StandardCharsets.UTF_8)); } } }
StringEncoder implements RequestEncoder { @Override public void apply(Object content, RequestSpecification requestSpecification) { if (content != null) { requestSpecification.content(content.toString().getBytes(StandardCharsets.UTF_8)); } }  }
StringEncoder implements RequestEncoder { @Override public void apply(Object content, RequestSpecification requestSpecification) { if (content != null) { requestSpecification.content(content.toString().getBytes(StandardCharsets.UTF_8)); } }  @Override void apply(Object content, RequestSpecification requestSpecification); }
StringEncoder implements RequestEncoder { @Override public void apply(Object content, RequestSpecification requestSpecification) { if (content != null) { requestSpecification.content(content.toString().getBytes(StandardCharsets.UTF_8)); } }  @Override void apply(Object content, RequestSpecification requestSpecification);  }