@Test(expected = InvalidFormatException.class)
public void testDeserializeStringInvalidFormat() throws IOException {

  when(context.handleWeirdStringValue(eq(Long.class), eq("invalid"), anyString())).thenThrow(InvalidFormatException.class);
  when(parser.hasToken(eq(JsonToken.VALUE_STRING))).thenReturn(true);
  when(parser.getText()).thenReturn("invalid");
  deserializer.deserialize(parser, context);
}