mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/pm/TestPowerManagerImpl.java
@Test
    public void testCreateWakeLockExisting()
    {
        m_SUT.createWakeLock(TestContext1.class, "lock1");

        try
        {
            m_SUT.createWakeLock(TestContext1.class, "lock1");
            fail("Expected IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
            // Expected
        }

        FactoryObject sourceObject = mockFactoryObject();
        m_SUT.createWakeLock(FactoryObjectProxy.class, sourceObject, "lock1");

        try
        {
            m_SUT.createWakeLock(FactoryObjectProxy.class, sourceObject, "lock1");
            fail("Expected IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
            // Expected
        }
    }
/**
     * Test method for {@link PowerManagerImpl#createWakeLock(java.lang.Class, java.lang.String)} when a wake lock
     * already exists for a given context or source object and ID.
     */
Test method for  PowerManagerImpl#createWakeLock(java.lang.Class, java.lang.String) when a wake lock
already exists for a given context or source object and ID.
Test method for PowerManagerImpl#createWakeLock ( java . lang . Class java . lang . String ) when a wake lock already exists for a given context or source object and ID .
@Test
    public void testCreateWakeLockExisting()
    {
        m_SUT.createWakeLock(TestContext1.class, "lock1");
        try
        {
            m_SUT.createWakeLock(TestContext1.class, "lock1");
            fail("Expected IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
        }
        FactoryObject sourceObject = mockFactoryObject();
        m_SUT.createWakeLock(FactoryObjectProxy.class, sourceObject, "lock1");
        try
        {
            m_SUT.createWakeLock(FactoryObjectProxy.class, sourceObject, "lock1");
            fail("Expected IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
        }
    }
@ Test public void testCreateWakeLockExisting ( ) { m_SUT . createWakeLock ( TestContext1 . class , "lock1" ) ; try { m_SUT . createWakeLock ( TestContext1 . class , "lock1" ) ; fail ( "Expected IllegalArgumentException" ) ; } catch ( IllegalArgumentException e ) { } FactoryObject sourceObject = mockFactoryObject ( ) ; m_SUT . createWakeLock ( FactoryObjectProxy . class , sourceObject , "lock1" ) ; try { m_SUT . createWakeLock ( FactoryObjectProxy . class , sourceObject , "lock1" ) ; fail ( "Expected IllegalArgumentException" ) ; } catch ( IllegalArgumentException e ) { } }
Test method for {@link PowerManagerImpl#createWakeLock(java.lang.Class, java.lang.String)} when a wake lock
 already exists for a given context or source object and ID.
Test method for { @link PowerManagerImpl#createWakeLock ( java . lang . Class java . lang . String ) } when a wake lock already exists for a given context or source object and ID .
// Expected // Expected