TypeCoercer { public <From extends IJsonNode, To extends IJsonNode> To coerce(final From node, final To target, final Class<To> targetType) { final To result = this.coerce(node, target, targetType, null); if (result == null) throw new CoercionException(String.format("Cannot coerce %s to %s", node, targetType)); return result; } TypeCoercer(); To coerce(final From node, final To target,
			final Class<To> targetType); @SuppressWarnings("unchecked") To coerce(final From node, final To target,
			final Class<To> targetClass, final To defaultValue); @SuppressWarnings("unchecked") To coerce(final From node, final To target,
			final To defaultValue); void setCoercer(final Class<From> from, final Class<To> to,
			final Coercer<From, To> coercer); @SuppressWarnings("unchecked")
	static final List<Class<? extends AbstractNumericNode>> NUMERIC_TYPES; static final TypeCoercer INSTANCE; }
@Test public void shouldPerformTheCoercionAsExpected() { try { final IJsonNode result = TypeCoercer.INSTANCE.coerce(this.value, null, this.targetType); Assert.assertTrue(String.format("%s->%s=%s", this.value.getClass(), this.targetType, result.getClass()), this.targetType.isInstance(result)); Assert.assertEquals(String.format("%s->%s=%s", this.value, this.targetType, result), this.expectedResult, result); } catch (final CoercionException e) { Assert.assertTrue(String.format("%s->%s=Exception", this.value, this.targetType), this.expectedResult == CONVERSION_ERROR); } }