Fix maven errors when unit testing