please find below code and let me know is it correct approach or not for validation of screen orientaion.
driver.rotate(ScreenOrientation.LANDSCAPE);
if(driver.getOrientation().equals("LANDSCAPE")){
System.out.println("PASS");
}else{
System.out.println("FAIL");
}