add maven enforcer plugin + refactor code for better testing