### Question:
CharTransformer implements Transformer<Character, String> { @Override public Character in(final String o) { return o.charAt(0); }  @Override Character in(final String o); @Override String out(final Character o);  }### Answer:
@Test public void shouldUseFirstCharFromString() { final Character actual = new CharTransformer().in("ab"); assertThat(actual).isEqualTo('a'); }
@Test public void shouldUseFirstCharFromSingleLetterString() { final Character actual = new CharTransformer().in("a"); assertThat(actual).isEqualTo('a'); }
@Test public void shouldThrowIfStringIsEmpty() { assertThatThrownBy(() -> new CharTransformer().in("")) .isInstanceOf(Exception.class); }