Multivariate linear regression: how to test for whether the slopes are the same? If I regress wages on education and the dummy variable gender using a linear conditional expectation function (wage = a + b(education) + c(gender)), how can I test that the slope b is the same for both males and females? i.e. the returns to education are the same?

Intuitively, I was thinking that one could conduct simple linear regressions of wage on education for males and females separately and then do a two-sample hypothesis test for whether the slope estimates are significantly different. Would this introduce issues with the omitted variable gender? Thank you.
Estimate the model 
$$W_i=a_1+a_2E_i+a_3G_i+a_4E_iG_i+\epsilon_i,$$
where $W,E,G$ denote wage, education, and an indicator for gender (e.g. 1 if male, 0 if female), respectively. The term $EG$ is an interaction term obtained by multiplying the gender dummy by education. A simple t-test of the hypothesis $H_0: a_4=0$ will tell you if the effects of additional education on wage are significantly different for different genders.