Add test for JAVA-418.