mil.dod.th.ose.core/test/mil/dod/th/ose/core/FactoryMocker.java
public static <T extends Address> AddressFactory mockAddressFactory(Class<T> type, String prefix)
    {
        AddressFactory factory = mock(FactoryInternal.class);
        stubMethods(factory, type);

        AddressCapabilities caps = new AddressCapabilities().withPrefix(prefix);
        when(factory.getCapabilities()).thenReturn(caps);
        
        return factory;
    }
/**
     * Mock an address factory that produces the given product type.
     * 
     * @param type
     *      product type that the factory will produce
     * @param prefix
     *      address prefix the factory uses, see {@link Address#getDescription()}
     */
Mock an address factory that produces the given product type.

@param type
product type that the factory will produce
@param prefix
address prefix the factory uses, see  Address#getDescription()
Mock an address factory that produces the given product type . @param type product type that the factory will produce @param prefix address prefix the factory uses see Address#getDescription ()
public static <T extends Address> AddressFactory mockAddressFactory(Class<T> type, String prefix)
    {
        AddressFactory factory = mock(FactoryInternal.class);
        stubMethods(factory, type);
        AddressCapabilities caps = new AddressCapabilities().withPrefix(prefix);
        when(factory.getCapabilities()).thenReturn(caps);
        return factory;
    }
public static < T extends Address > AddressFactory mockAddressFactory ( Class < T > type , String prefix ) { AddressFactory factory = mock ( FactoryInternal . class ) ; stubMethods ( factory , type ) ; AddressCapabilities caps = new AddressCapabilities ( ) . withPrefix ( prefix ) ; when ( factory . getCapabilities ( ) ) . thenReturn ( caps ) ; return factory ; }
Mock an address factory that produces the given product type.
Mock an address factory that produces the given product type .