Tunable beam splitting and negative refraction in heterostructure with metamaterial