Add tests for getYAxis() method in y_axis

Add tests for getYAxis() method (see #1831).