Fix broken test on java-sdk7