OSGIObjectFactory implements IPentahoObjectFactory { @Override public Class<?> getImplementingClass( String key ) { throw new UnsupportedOperationException( "OSGI Object Factory does not support this method" ); } OSGIObjectFactory( final BundleContext context ); T get( Class<T> tClass, IPentahoSession session ); @Override T get( Class<T> interfaceClass, String key, IPentahoSession session ); @Override T get( Class<T> interfaceClass, IPentahoSession session, Map<String, String> properties ); @Override boolean objectDefined( String clazz ); @Override boolean objectDefined( Class<?> clazz ); @Override Class<?> getImplementingClass( String key ); @Override void init( String configFile, Object context ); @Override List<T> getAll( Class<T> interfaceClass, IPentahoSession curSession ); @Override List<T> getAll( Class<T> interfaceClass, IPentahoSession session, Map<String, String> properties ); @Override IPentahoObjectReference<T> getObjectReference( Class<T> interfaceClass, IPentahoSession curSession ); @Override IPentahoObjectReference<T> getObjectReference( Class<T> interfaceClass, IPentahoSession curSession,
                                                            Map<String, String> properties ); @Override List<IPentahoObjectReference<T>> getObjectReferences( Class<T> interfaceClass, IPentahoSession curSession ); @Override List<IPentahoObjectReference<T>> getObjectReferences( Class<T> interfaceClass, IPentahoSession curSession,
                                                                   Map<String, String> properties ); @Override String getName(); static final String REFERENCE_CLASS; }
@Test public void testGetImplementingClass() throws Exception { try { factory.getImplementingClass( "java.lang.String" ); fail( "Should have thrown an exception" ); } catch ( UnsupportedOperationException e ) { } assertTrue( true ); }