UriConverter implements Converter<Uri, String> { @NonNull @Override public String toSupported(@Nullable Uri converted) { if (converted == null) { return EMPTY_URI; } return converted.toString(); }  @NonNull @Override Uri toConverted(@Nullable String supported); @NonNull @Override String toSupported(@Nullable Uri converted);  }
@Test public void toSupportedShouldReturnStringUri() throws Exception { final Uri uri = Uri.parse("https: final String actual = underTest.toSupported(uri); assertThat(actual) .isEqualTo("https: }
@Test public void toSupportedShouldReturnEmptyStringWhenUriIsNull() throws Exception { final String actual = underTest.toSupported(null); assertThat(actual) .isNotNull() .isEmpty(); }