@Test void matchesReturnsFalseIfContentIsNotTheSameType() { final List<BodyContent<?>> bodyContents = asList( arrayBody(emptyList()), literalBody(""), objectBody(emptyMap()) ); bodyContents.forEach(bodyContent -> assertThat(underTest.matches(bodyContent)).isFalse()); }
@Override public boolean matches(Body<?> other) { return other instanceof StringBodyContent && content.matches(((StringBodyContent)other).getContent()); }
StringBodyContent extends BodyContent<String> { @Override public boolean matches(Body<?> other) { return other instanceof StringBodyContent && content.matches(((StringBodyContent)other).getContent()); } }
StringBodyContent extends BodyContent<String> { @Override public boolean matches(Body<?> other) { return other instanceof StringBodyContent && content.matches(((StringBodyContent)other).getContent()); } private  StringBodyContent(String content); }
StringBodyContent extends BodyContent<String> { @Override public boolean matches(Body<?> other) { return other instanceof StringBodyContent && content.matches(((StringBodyContent)other).getContent()); } private  StringBodyContent(String content); @Override String getContent(); @Override boolean matches(Body<?> other); @Override StringBodyContent copy(); @Override BodyContentType getType(); static StringBodyContent stringBody(String content); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
StringBodyContent extends BodyContent<String> { @Override public boolean matches(Body<?> other) { return other instanceof StringBodyContent && content.matches(((StringBodyContent)other).getContent()); } private  StringBodyContent(String content); @Override String getContent(); @Override boolean matches(Body<?> other); @Override StringBodyContent copy(); @Override BodyContentType getType(); static StringBodyContent stringBody(String content); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }