Porting a class to java as a PoC