Fix checkstyle errors for Google tests

And add a previously missing licence header.