AtomicLongTypeConverter implements TypeConverter<String, AtomicLong> { @Override public AtomicLong convert(final String value) { Utils.checkArgument(value != null, "Value to convert must not be null"); Utils.checkArgument(!value.isEmpty(), "Value to convert must not be empty"); return new AtomicLong(Long.parseLong(value)); }  @Override AtomicLong convert(final String value);  }
@Test public void whenInputIsLegalValue_ThenShouldReturnAtomicLong() { assertThat(converter.convert("5")).isNotNull(); assertThat(converter.convert("5").get()).isEqualTo(5); }