### Question:
TargetUtil { static public Number process(Target target, Double value){ double result = value.doubleValue(); Double min = target.getMin(); if(min != null){ result = Math.max(result, min.doubleValue()); } Double max = target.getMax(); if(max != null){ result = Math.min(result, max.doubleValue()); } result = (result * target.getRescaleFactor() + target.getRescaleConstant()); Target.CastInteger castInteger = target.getCastInteger(); if(castInteger == null){ return result; } switch(castInteger){ case ROUND: return (int)Math.round(result); case CEILING: return (int)Math.ceil(result); case FLOOR: return (int)Math.floor(result); default: throw new UnsupportedFeatureException(target, castInteger); } } private  TargetUtil(); static Map<FieldName, ? extends Number> evaluateRegression(Double value, ModelEvaluationContext context); static Map<FieldName, ? extends Number> evaluateRegression(Map<FieldName, Double> predictions, ModelEvaluationContext context); static Map<FieldName, ? extends ClassificationMap<?>> evaluateClassification(ClassificationMap<?> value, ModelEvaluationContext context); static Map<FieldName, ? extends ClassificationMap<?>> evaluateClassification(Map<FieldName, ? extends ClassificationMap<?>> predictions, ModelEvaluationContext context); static Number process(Target target, Double value); static TargetValue getTargetValue(Target target, Object value);  }### Answer:
@Test public void process(){ Target target = new Target(new FieldName("amount")); target.setRescaleFactor(3.14); target.setRescaleConstant(10d); assertTrue(VerificationUtil.acceptable(35.12d, TargetUtil.process(target, 8d))); target.setMin(-10d); target.setMax(10.5d); target.setCastInteger(Target.CastInteger.ROUND); assertEquals(35, TargetUtil.process(target, 8d)); assertEquals(43, TargetUtil.process(target, 12.97d)); }