How to add/change device orientation in Appium Java TestNG?

How can I add/change device orientation in Appium Java TestNG ?