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