### Question:
OSGIPluginTracker { public <T extends PluginTypeInterface> Object getBeanPluginProperty( Class<? extends PluginTypeInterface> pluginType, Object instance, String prop ) { try { BeanFactory beanFactory = beanToFactoryMap.get( instance ); if ( beanFactory == null ) { return null; } Bundle bundle = beanFactoryToBundleMap.get( beanFactory ); BundleContext cxt = bundle.getBundleContext(); ServiceReference[] registeredServices = bundle.getRegisteredServices(); if ( registeredServices == null ) { return null; } for ( ServiceReference registeredService : registeredServices ) { Object registeredServiceProperty = registeredService.getProperty( "objectClass" ); String proVal = ( registeredServiceProperty instanceof String ) ? (String) registeredServiceProperty : ( (String[]) registeredServiceProperty )[ 0 ]; if ( proVal.equals( PluginInterface.class.getName() ) && registeredService.getProperty( "PluginType" ).equals( pluginType.getName() ) ) { Object service = cxt.getService( registeredService ); if ( service instanceof OSGIPlugin ) { if ( "ID".equalsIgnoreCase( prop ) ) { return ( (OSGIPlugin) service ).getID(); } } return BeanUtils.getProperty( service, prop ); } } } catch ( Exception e ) { logger.error( e.getMessage(), e ); } return null; } @VisibleForTesting protected  OSGIPluginTracker(); @VisibleForTesting protected  OSGIPluginTracker( AggregatingNotifierListener aggregatingNotifierListener ); static OSGIPluginTracker getInstance(); List<T> getServiceObjects( Class<T> clazz, Map<String, String> props ); T getBean( Class<T> clazz, Object serviceClass, String id ); Object getBeanPluginProperty( Class<? extends PluginTypeInterface> pluginType,
                                                                       Object instance, String prop ); ClassLoader getClassLoader( Object instance ); void setBeanFactoryLookup( BeanFactoryLocator lookup ); ProxyUnwrapper getProxyUnwrapper(); void setProxyUnwrapper( ProxyUnwrapper proxyUnwrapper ); BeanFactory findOrCreateBeanFactoryFor( Object serviceObject ); void shutdown(); void addPluginLifecycleListener( Class clazzToTrack, OSGIServiceLifecycleListener listener ); BundleContext getBundleContext(); void setBundleContext( BundleContext context ); boolean registerPluginClass( Class clazz ); void serviceChanged( Class<?> cls, LifecycleEvent evt, ServiceReference serviceObject ); boolean addDelayedServiceNotifierListener( DelayedServiceNotifierListener delayedServiceNotifierListener ); boolean removeDelayedServiceNotifierListener( DelayedServiceNotifierListener delayedServiceNotifierListener ); int getOutstandingServiceNotifierListeners();  }### Answer:
@Test public void testGetBeanPluginPropertyNull() { assertNull( tracker.getBeanPluginProperty( OSGIPluginType.class, new Object(), "TEST" ) ); }