fix failing java test

small matrix becomes the same after shuffling