Fix tests and update pom.xml