Cleaned up build.gradle and add a unit test.