@@ -0,0 +1,2260 @@
+/*%0A * ============================================================================%0A * (c) Copyright 2004 Nokia%0A * This material, including documentation and any related computer programs,%0A * is protected by copyright controlled by Nokia and its licensors. %0A * All rights are reserved.%0A * %0A * These materials have been contributed  to the Open Services Gateway %0A * Initiative (OSGi)as %22MEMBER LICENSED MATERIALS%22 as defined in, and subject %0A * to the terms of, the OSGi Member Agreement specifically including, but not %0A * limited to, the license rights and warranty disclaimers as set forth in %0A * Sections 3.2 and 12.1 thereof, and the applicable Statement of Work. %0A * All company, brand and product names contained within this document may be %0A * trademarks that are the sole property of the respective owners.  %0A * The above notice must be included on all copies of this document.%0A * ============================================================================%0A */%0Apackage unittests;%0A%0Aimport org.osgi.impl.service.policy.condpermadmin.ConditionalPermissionAdminPlugin;%0Aimport org.osgi.service.dmt.DmtException;%0Aimport org.osgi.service.dmt.DmtSession;%0Aimport unittests.util.DmtPluginTestCase;%0A%0A/**%0A *%0A * TODO Add Javadoc comment for this type.%0A * %0A * @version $Revision$%0A */%0Apublic class ConditionalPermissionPluginTest extends DmtPluginTestCase %7B%0A%09%0A%09/**%0A%09 * the plugin currently tested%0A%09 */%0A%09public ConditionalPermissionAdminPlugin plugin;%0A%09%0A%09/**%0A%09 * the DMT session opened during a testcase%0A%09 */%0A%09public DmtSession dmtSession;%0A%0A%09/**%0A%09 * conditional permission admin simulator%0A%09 */%0A%09public DummyConditionalPermissionAdmin condPermAdmin;%0A%0A%09public void setUp() throws Exception %7B%0A%09%09super.setUp();%0A%09%09condPermAdmin = new DummyConditionalPermissionAdmin();%0A%09%09plugin = new ConditionalPermissionAdminPlugin(condPermAdmin);%0A%09%09addDataPlugin(ConditionalPermissionAdminPlugin.dataRootURI,plugin);%0A%09%7D%0A%09%0A%09public void tearDown() throws Exception %7B%0A%09%09condPermAdmin = null;%0A%09%09plugin = null;%0A%09%09dmtSession = null;%0A%09%09super.tearDown();%0A%09%7D%0A%0A%09public void newSession() throws DmtException %7B%0A%09%09dmtSession = dmtFactory.getSession(ConditionalPermissionAdminPlugin.dataRootURI);%0A%09%09assertNotNull(dmtSession);%0A%09%7D%0A%0A%09public void testRegister() throws Exception %7B%0A%09%09newSession();%0A%09%09%0A%09%7D%0A%7D%0A

check creation and open