mil.dod.th.ose.shell/test/mil/dod/th/ose/shell/TestPowerManagerCommands.java
private WakeLock mockWakeLock(String id, FactoryObject obj)
    {
        WakeLock lock = mockWakeLock(id);
        when(lock.getSourceObject()).thenReturn(obj);
        return lock;
    }
/**
     * Creates a mocked WakeLock
     * @param id
     *  the id of the WakeLock 
     * @param obj
     *  the factory object associated with this wakelock
     * @return
     *  the mocked WakeLock
     */
Creates a mocked WakeLock
@param id
the id of the WakeLock
@param obj
the factory object associated with this wakelock
@return
the mocked WakeLock
Creates a mocked WakeLock @param id the id of the WakeLock @param obj the factory object associated with this wakelock @return the mocked WakeLock
private WakeLock mockWakeLock(String id, FactoryObject obj)
    {
        WakeLock lock = mockWakeLock(id);
        when(lock.getSourceObject()).thenReturn(obj);
        return lock;
    }
private WakeLock mockWakeLock ( String id , FactoryObject obj ) { WakeLock lock = mockWakeLock ( id ) ; when ( lock . getSourceObject ( ) ) . thenReturn ( obj ) ; return lock ; }
Creates a mocked WakeLock
 @param id
  the id of the WakeLock
 @param obj
  the factory object associated with this wakelock
 @return
  the mocked WakeLock
Creates a mocked WakeLock @param id the id of the WakeLock @param obj the factory object associated with this wakelock @return the mocked WakeLock