Code example for SecurityPermission

0
		// Test for method boolean 
		// java.security.AllPermission.equals(java.lang.Object) 
		assertTrue("Two AllPermissions not equal to each other.",
				new AllPermission().equals(new AllPermission()));
		assertTrue("AllPermission equals a SecurityPermission.",
				!(new AllPermission().equals(new SecurityPermission("ugh!"))));
	} 
 
	/** 
	 * @tests java.security.AllPermission#getActions() 
	 */ 
	public void test_getActions() { 
		AllPermission ap = new AllPermission();
		// Test for method java.lang.String 
		// java.security.AllPermission.getActions() 
		assertTrue("AllPermission has non-empty actions. (" + ap.getActions()
				+ ")", ap.getActions().equals("<all actions>"));
	} 
 
	/** 
	 * @tests java.security.AllPermission#hashCode()