Source:
public void testOrientation ( ) { com.android.ide.common.layout.LinearLayoutRule rule = new com.android.ide.common.layout.LinearLayoutRule ( ) ; com.android.ide.common.api.INode node = com.android.ide.common.layout.TestNode.create ( "android.widget.Button" ) . id ( "@+id/Button012" ) ; assertNull ( node.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION ) ) ; java.util.List < com.android.ide.common.api.MenuAction > contextMenu = rule.getContextMenu ( node ) ; assertEquals ( 4 , contextMenu.size ( ) ) ; com.android.ide.common.api.MenuAction orientationAction = contextMenu.get ( 3 ) ; assertTrue ( orientationAction.getClass ( ) . getName ( ) , ( orientationAction instanceof com.android.ide.common.api.MenuAction.Choices ) ) ; com.android.ide.common.api.MenuAction.Choices choices = ( ( com.android.ide.common.api.MenuAction.Choices ) ( orientationAction ) ) ; com.android.ide.common.api.IMenuCallback callback = choices.getCallback ( ) ; callback.action ( orientationAction , com.android.ide.common.layout.LayoutConstants.VALUE_VERTICAL , true ) ; java.lang.String orientation = node.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION ) ; assertEquals ( com.android.ide.common.layout.LayoutConstants.VALUE_VERTICAL , orientation ) ; callback.action ( orientationAction , com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL , true ) ; orientation = node.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION ) ; assertEquals ( com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL , orientation ) ; }

Target:
public void testOrientation ( ) { com.android.ide.common.layout.LinearLayoutRule rule = new com.android.ide.common.layout.LinearLayoutRule ( ) ; initialize ( rule , "android.widget.LinearLayout" ) ; com.android.ide.common.api.INode node = com.android.ide.common.layout.TestNode.create ( "android.widget.Button" ) . id ( "@+id/Button012" ) ; assertNull ( node.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION ) ) ; java.util.List < com.android.ide.common.api.MenuAction > contextMenu = rule.getContextMenu ( node ) ; assertEquals ( 4 , contextMenu.size ( ) ) ; com.android.ide.common.api.MenuAction orientationAction = contextMenu.get ( 3 ) ; assertTrue ( orientationAction.getClass ( ) . getName ( ) , ( orientationAction instanceof com.android.ide.common.api.MenuAction.Choices ) ) ; com.android.ide.common.api.MenuAction.Choices choices = ( ( com.android.ide.common.api.MenuAction.Choices ) ( orientationAction ) ) ; com.android.ide.common.api.IMenuCallback callback = choices.getCallback ( ) ; callback.action ( orientationAction , com.android.ide.common.layout.LayoutConstants.VALUE_VERTICAL , true ) ; java.lang.String orientation = node.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION ) ; assertEquals ( com.android.ide.common.layout.LayoutConstants.VALUE_VERTICAL , orientation ) ; callback.action ( orientationAction , com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL , true ) ; orientation = node.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION ) ; assertEquals ( com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL , orientation ) ; }