@Test public void cannotFindConverter() throws IOException { ContentTypeBasedRespConverter<String> converter = new ContentTypeBasedRespConverter<>(); converter.add(MediaType.parse("text/plain"), new Converters.StringResponseConverter()); converter.add(MediaType.parse("applicaton/xml"), new Converters.StringResponseConverter()); try { converter.convert(networkResponse); fail(); } catch (RuntimeException e) { assertThat(e).hasMessageStartingWith("Cannot find converter for " + ":NetworkResponse{contentType=application/json, statusCode=200, data={\"key\"" + " " + ": \"value\"}, headers=Content-Type: application/json\n" + ", networkTimeNs=0}, tried:"); } }
public ContentTypeBasedRespConverter<T> add(MediaType mediaType, Converter<NetworkResponse, T> converter) { converters.put(mediaType, converter); return this; }
ContentTypeBasedRespConverter extends AbstractSmartResponseConverter<T> { public ContentTypeBasedRespConverter<T> add(MediaType mediaType, Converter<NetworkResponse, T> converter) { converters.put(mediaType, converter); return this; } }
ContentTypeBasedRespConverter extends AbstractSmartResponseConverter<T> { public ContentTypeBasedRespConverter<T> add(MediaType mediaType, Converter<NetworkResponse, T> converter) { converters.put(mediaType, converter); return this; }  }
ContentTypeBasedRespConverter extends AbstractSmartResponseConverter<T> { public ContentTypeBasedRespConverter<T> add(MediaType mediaType, Converter<NetworkResponse, T> converter) { converters.put(mediaType, converter); return this; }  ContentTypeBasedRespConverter<T> add(MediaType mediaType, Converter<NetworkResponse, T>
            converter); }
ContentTypeBasedRespConverter extends AbstractSmartResponseConverter<T> { public ContentTypeBasedRespConverter<T> add(MediaType mediaType, Converter<NetworkResponse, T> converter) { converters.put(mediaType, converter); return this; }  ContentTypeBasedRespConverter<T> add(MediaType mediaType, Converter<NetworkResponse, T>
            converter);  }