Enable JUnit tests and porting to java 17