I get a NoSuchMethodException when executing:
operacionDTO.getClass().getMethod("setPrioridad").invoke(operacionDTO, 0);
java.lang.NoSuchMethodException: xxxx.api.service.dto.RegasificacionDTO.setPrioridad()
But class RegasificacionDTO does have a public method called setPrioridad(int i), and if when debugging I call:
operacionDTO.getClass().getMethods()
Then I get an array of Method in which there is a setPrioridad. I've tried with some other similar methods and I get the same error.