Refactored and static methods to setup mock mvc