### Question:
AbstractBodyAdapter implements BodyAdapter { protected void requireSupport(TypeRef<?> type) { if (!supportsType(type)) { throw new UnsupportedOperationException("unsupported type: " + type); } } protected  AbstractBodyAdapter(MediaType... compatibleMediaTypes); @Override final boolean isCompatibleWith(MediaType mediaType); static Charset charsetOrDefault(@Nullable MediaType mediaType, Charset defaultCharset); static Charset charsetOrUtf8(@Nullable MediaType mediaType); static BodyPublisher attachMediaType(
      BodyPublisher publisher, @Nullable MediaType mediaType);  }### Answer:
@Test void requireSupport() { var adapter = new AbstractBodyAdapter() { @Override public boolean supportsType(TypeRef<?> type) { return List.class.isAssignableFrom(type.rawType()); } }; assertThrows(UnsupportedOperationException.class, () -> adapter.requireSupport(Set.class)); }