public void createsParameterExpressionWithMostConcreteType() throws Exception {
Method method = SampleRepository.class.getMethod("findByIdGreaterThan", int.class);
Parameters<?, ?> parameters = new DefaultParameters(method);
ParametersParameterAccessor accessor = new ParametersParameterAccessor(parameters, new Object[] { 1 });
Part part = new Part("IdGreaterThan", User.class);
ParameterMetadataProvider provider = new ParameterMetadataProvider(em.getCriteriaBuilder(), accessor);
ParameterExpression<? extends Comparable> expression = provider.next(part, Comparable.class).getExpression();
assertThat(expression.getParameterType(), is(typeCompatibleWith(int.class)));
}