@Test
public void testConvertShouldThrowClassCastExceptionIfDataIsNotConvertable() {

    // Given:
    Object data = "not convertable";
    Class<?>[] parameterTypes = new Class<?>[] { Integer.class };
    expectedException.expect(ClassCastException.class);
    expectedException.expectMessage(
            "Cannot cast to either Object[][], Object[], String[], or Iterable because data was: " + data);
    // When:
    underTest.convert(data, false, parameterTypes, context);
    // Then: expect exception
}