问题 I am trying to Test a method but it has a global variable which is null, Please guide me so I can assign value to global variable i.e. a Map My Junit: public class ErrorTest { @Mock private DataSource db; @Mock private JdbcTemplate jdbcTemplate; @InjectMocks private RateServiceImpl rateService = new RateServiceImpl(); @Mock private RaterDao raterDao; @Resource private MessageSource msg ; @Mock Map<String, StringAttribute> errorMap = new HashMap<String, StringAttribute>(); @Before public void