Beispiel #1
0
 @Test
 public void nullCursor() {
   Fetcher fetcher = Fetcher.of(null);
   assertThat(fetcher.toList(Converter.STRING)).isNotNull().isEmpty();
   assertThat(fetcher.toSet(Converter.STRING)).isNotNull().isEmpty();
   assertThat(fetcher.toCollection(Converter.STRING, Collections.<String>emptyList()))
       .isNotNull()
       .isEmpty();
   final Optional<String> result = fetcher.toValue(Converter.STRING);
   assertThat(result).isNotNull();
   assertFalse(result.isPresent());
 }