Decoders extends MediaTypeCodecs<Decoder> { public Decoder decoder(CharSequence contentType) { if (contentType == null) { return defaultValue(); } String[] parts = PARAM_DELIMITER.split(contentType); return getOrDefault(parts[0]); } @Builder private  Decoders(CharSequence defaultContentType, @Singular ImmutableList<Decoder> decoders); Decoder decoder(CharSequence contentType);  }
@Test void testDefaultDecoder() { assertSame(jsonDecoder, decoders.decoder("")); }
@Test void testDefaultDecoderForNul() { assertSame(jsonDecoder, decoders.decoder(null)); }
@Test void testDecoderWithoutParam() { assertSame(fooBarDecoder, decoders.decoder("foo/bar")); }
@Test void testDecoderWithParam() { assertSame(fooBarDecoder, decoders.decoder("foo/bar ; charset=utf-8")); }