### Question:
ManagedResourceProvider implements ResourceProvider { protected File findManagedResourcesFolder( ) { Preconditions.checkState( !Strings.isNullOrEmpty( System.getProperty( "karaf.home" ) ), "karaf.home system property is not set" ); File root = new File( System.getProperty( "karaf.home" ) ); return Paths.get( root.getAbsolutePath(), MANAGED_RESOURCES_DIR ).toFile(); }  void setBundleContext( BundleContext bundleContext ); void init(); @Override File getManagedResourceFolder(); @Override File provideFolder( Bundle bundle, String relativePath ); @Override File provideFolder( String bundleName, String relativePath ); @Override File provideFile( Bundle bundle, String relativePath ); @Override File provideFile( String bundleName, String relativePath ); static String MANAGED_RESOURCES_DIR; }### Answer:
@Test public void findManagedResourcesFolderTest() { File managedResourceFolder = resourceProvider.findManagedResourcesFolder(); assertTrue( managedResourceFolder.getAbsolutePath().contains( karafPath + ManagedResourceProvider.MANAGED_RESOURCES_DIR ) ); }