Fixing build.gradle and test hanging issue