### Question:
GenericRowValueTypeEnforcer { private Long enforceLong(final Object value) { if (value instanceof Long) { return (Long) value; } else if (value instanceof Integer) { return ((Integer) value).longValue(); } else if (value instanceof Float) { return ((Float) value).longValue(); } else if (value instanceof Short) { return ((Short) value).longValue(); } else if (value instanceof Byte) { return ((Byte) value).longValue(); } else if (value instanceof String || value instanceof CharSequence) { return Long.parseLong(value.toString()); } else if (value == null) { return null; } else { throw new KsqlException("Invalid field type. Value must be Long."); } } GenericRowValueTypeEnforcer(final Schema schema); Object enforceFieldType(final int index, final Object value);  }### Answer:
@Test public void testEnforceLong() { SchemaBuilder schemaBuilder = SchemaBuilder.struct().field("long", SchemaBuilder.int64()); GenericRowValueTypeEnforcer genericRowValueTypeEnforcer = new GenericRowValueTypeEnforcer(schemaBuilder); try { genericRowValueTypeEnforcer.enforceFieldType(0, Boolean.FALSE); fail("Expecting exception: KsqlException"); } catch (KsqlException e) { assertEquals(GenericRowValueTypeEnforcer.class.getName(), e.getStackTrace()[0].getClassName()); } }