SI-7408 Fix test by sorting results of getDeclaredClasses

run/t4023 can fail (and has already) because the order of elements
in the reflection API is not specified and can differ between platforms
(e. g. HotSpot and Avian) or even versions (Java 7 vs. Java 8).
Merge pull request #2433 from soc/SI-7408

SI-7408 Fix test by sorting results of getDeclaredClasses