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