MAPREDUCE-6048. Fixed TestJavaSerialization failure. Contributed by Varun Vasudev
(cherry picked from commit 73068f677bc45029743ba2e0b3c0256a8069c13e)