### Question:
GraffitiConverter implements CommandLine.ITypeConverter<Bytes32> { @Override public Bytes32 convert(final String value) { byte[] input = value.getBytes(StandardCharsets.UTF_8); if (input.length > 32) { throw (new CommandLine.TypeConversionException( "'" + value + "' converts to " + input.length + " bytes. A maximum of 32 bytes can be used as graffiti.")); } byte[] bytes = new byte[32]; System.arraycopy(input, 0, bytes, 0, input.length); return Bytes32.wrap(bytes); }  @Override Bytes32 convert(final String value);  }### Answer:
@Test public void shouldRejectStringsThatAreTooLong() { assertThrows(CommandLine.TypeConversionException.class, () -> converter.convert(data)); }
@Test public void shouldAcceptShortStrings() { final Bytes32 bytes = Bytes32.fromHexString("0x5468650000000000000000000000000000000000000000000000000000000000"); assertThat(converter.convert(data.substring(0, 3))).isEqualTo(bytes); }
@Test public void shouldAcceptMaxLengthStrings() { final Bytes32 bytes = Bytes32.fromHexString("0x54686520717569636b2062726f776e20666f78206a756d7073206f7665722074"); assertThat(converter.convert(data.substring(0, 32))).isEqualTo(bytes); }
@Test public void shouldAcceptEmptyStrings() { assertThat(converter.convert("")).isEqualTo(Bytes32.ZERO); }