@Test
public void should_convert_string_to_long() throws Exception {

    // given
    Long expectedLong = Long.valueOf(-456);
    StateTypeConverter typeConverter = new StateTypeConverter();
    // when
    Long convertedLong = typeConverter.convert("-456", Long.class);
    // then
    assertThat(convertedLong).isEqualTo(expectedLong);
}