mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/TestAbstractFactoryObject.java
@SuppressWarnings("unchecked")
    @Test
    public void testCreatePowerManagerWakeLock()
    {
        WakeLock lock = mock(WakeLock.class);
        when(m_PowerInternal.createWakeLock(Mockito.any(Class.class), Mockito.any(FactoryObject.class), eq("lock.id")))
               .thenReturn(lock);
        WakeLock returned = m_SUT.createPowerManagerWakeLock("lock.id");
        
        verify(m_PowerInternal).createWakeLock(m_FactoryProxy.getClass(), m_SUT, "lock.id");
        assertThat(returned, is(lock));
    }
/**
     * Verify that wake lock is created.
     */
Verify that wake lock is created.
Verify that wake lock is created .
@SuppressWarnings("unchecked")
    @Test
    public void testCreatePowerManagerWakeLock()
    {
        WakeLock lock = mock(WakeLock.class);
        when(m_PowerInternal.createWakeLock(Mockito.any(Class.class), Mockito.any(FactoryObject.class), eq("lock.id")))
               .thenReturn(lock);
        WakeLock returned = m_SUT.createPowerManagerWakeLock("lock.id");
        verify(m_PowerInternal).createWakeLock(m_FactoryProxy.getClass(), m_SUT, "lock.id");
        assertThat(returned, is(lock));
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testCreatePowerManagerWakeLock ( ) { WakeLock lock = mock ( WakeLock . class ) ; when ( m_PowerInternal . createWakeLock ( Mockito . any ( Class . class ) , Mockito . any ( FactoryObject . class ) , eq ( "lock.id" ) ) ) . thenReturn ( lock ) ; WakeLock returned = m_SUT . createPowerManagerWakeLock ( "lock.id" ) ; verify ( m_PowerInternal ) . createWakeLock ( m_FactoryProxy . getClass ( ) , m_SUT , "lock.id" ) ; assertThat ( returned , is ( lock ) ) ; }
Verify that wake lock is created.
Verify that wake lock is created .