mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/api/TestFactoryRegistry.java
private FactoryObjectInternal createMockFactObj(final UUID uuid, final String name,
            final String pid) throws IllegalArgumentException, FactoryObjectInformationException
    {
        FactoryObjectInternal testObj = mock(FactoryObjectInternal.class);
        when(testObj.getUuid()).thenReturn(uuid);
        when(testObj.getName()).thenReturn(name);
        when(testObj.getFactory()).thenReturn(m_FactoryDescriptor);
        when(testObj.getProxy()).thenReturn(mock(FactoryObjectProxy.class));
        if (pid != null)
        {
            when(testObj.getPid()).thenReturn(pid);
        }

        return testObj;
    }
/**
     * Create mock factory object information.
     */
Create mock factory object information.
Create mock factory object information .
private FactoryObjectInternal createMockFactObj(final UUID uuid, final String name,
            final String pid) throws IllegalArgumentException, FactoryObjectInformationException
    {
        FactoryObjectInternal testObj = mock(FactoryObjectInternal.class);
        when(testObj.getUuid()).thenReturn(uuid);
        when(testObj.getName()).thenReturn(name);
        when(testObj.getFactory()).thenReturn(m_FactoryDescriptor);
        when(testObj.getProxy()).thenReturn(mock(FactoryObjectProxy.class));
        if (pid != null)
        {
            when(testObj.getPid()).thenReturn(pid);
        }
        return testObj;
    }
private FactoryObjectInternal createMockFactObj ( final UUID uuid , final String name , final String pid ) throws IllegalArgumentException , FactoryObjectInformationException { FactoryObjectInternal testObj = mock ( FactoryObjectInternal . class ) ; when ( testObj . getUuid ( ) ) . thenReturn ( uuid ) ; when ( testObj . getName ( ) ) . thenReturn ( name ) ; when ( testObj . getFactory ( ) ) . thenReturn ( m_FactoryDescriptor ) ; when ( testObj . getProxy ( ) ) . thenReturn ( mock ( FactoryObjectProxy . class ) ) ; if ( pid != null ) { when ( testObj . getPid ( ) ) . thenReturn ( pid ) ; } return testObj ; }
Create mock factory object information.
Create mock factory object information .