bug: Fix junit tests for Java 8

Change-Id: I1e9777f197a3c8e90fb710b9367131863199f8da