class SimpleExpressionEvaluator implements ExpressionEvaluator {

    @Override
    public <T> T evaluate( String expression, Class<T> type ) throws EvaluationException
    {
        if ( expression == null )
        {
            throw new EvaluationException( "Cannot evaluate null as an expression " );
        }
        if ( type == null )
        {
            throw new EvaluationException( "Cannot evaluate to type null" );
        }

        return cast( map( evaluator.evaluate( expression ) ), type );
    }

}