Testing of Location Parameters Against Restricted Alternatives with Optimal Choice of Weights