In elasticity, microstructure-related deviations may be modeled by strain gradient elasticity. For so-called metamaterials, different implementations are possible for solving strain gradient elasticity problems numerically. Analytical solutions of simple problems are used to verify the numerical approach. We demonstrate such a case in a two-dimensional continuum as a benchmark case for computations. As strain gradient enforces higher regularity conditions in displacements, in the finite element method (FEM), the use of standard elements is often seen as inadequate. For such piecewise or elementwise continuous elements, we examine a possible remedy to correctly simulate strain gradient elasticity problems by implementing two techniques. First, we enforce continuity of displacement gradient across elements; second, we employ a mixed finite element method where displacement and its gradient are solved both as unknowns. The results show the pros and cons of each numerical technique. All methods converge monotonically, but the mixed method is more reliable than the other one.