### Question:
Value { public V cast() { return converter.convert(value); } Value(String value, ValueConverter<V> converter); V cast();  }### Answer:
@Test public void testName() throws Exception { @SuppressWarnings("unchecked") ValueConverter<Long> converter = mock(ValueConverter.class); doReturn(5L).when(converter).convert("12"); Value<Long> value = new Value<Long>("12", converter); assertEquals(Long.valueOf(5), value.cast()); }