783b85
From f6eb583525c7f777bde16182c57a47345fd53cb0 Mon Sep 17 00:00:00 2001
783b85
From: Marian Koncek <mkoncek@redhat.com>
783b85
Date: Thu, 5 Sep 2019 15:21:04 +0200
783b85
Subject: [PATCH] Remove dependency on powermock
783b85
783b85
---
783b85
 .../StringSearchModelInterpolatorTest.java    | 66 -------------------
783b85
 1 file changed, 66 deletions(-)
783b85
783b85
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
783b85
index b66abca..a5b2aa0 100644
783b85
--- a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
783b85
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
783b85
@@ -36,8 +36,6 @@ import java.util.concurrent.FutureTask;
783b85
 import static org.hamcrest.CoreMatchers.anyOf;
783b85
 import static org.hamcrest.CoreMatchers.is;
783b85
 import static org.junit.Assert.assertThat;
783b85
-import static org.powermock.reflect.Whitebox.getField;
783b85
-import static org.powermock.reflect.Whitebox.getInternalState;
783b85
 
783b85
 /**
783b85
  * @author jdcasey
783b85
@@ -374,70 +372,6 @@ public class StringSearchModelInterpolatorTest
783b85
         ) ) );
783b85
     }
783b85
 
783b85
-    public void testNotInterpolateObjectWithFile()
783b85
-            throws Exception
783b85
-    {
783b85
-        Model model = new Model();
783b85
-
783b85
-        File baseDir = new File( System.getProperty( "user.dir" ) );
783b85
-
783b85
-        Properties p = new Properties();
783b85
-
783b85
-        ObjectWithNotInterpolatedFile obj = new ObjectWithNotInterpolatedFile( baseDir );
783b85
-
783b85
-        StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
783b85
-
783b85
-        ModelBuildingRequest config = createModelBuildingRequest( p );
783b85
-
783b85
-        SimpleProblemCollector collector = new SimpleProblemCollector();
783b85
-        interpolator.interpolateObject( obj, model, new File( "." ), config, collector );
783b85
-        assertProblemFree( collector );
783b85
-
783b85
-        //noinspection unchecked
783b85
-        Map<Class<?>, ?> cache =
783b85
-                (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
783b85
-                        .get( null );
783b85
-
783b85
-        Object objCacheItem = cache.get( Object.class );
783b85
-        Object fileCacheItem = cache.get( File.class );
783b85
-
783b85
-        assertNotNull( objCacheItem );
783b85
-        assertNotNull( fileCacheItem );
783b85
-
783b85
-        assertThat( ( (Object[]) getInternalState( objCacheItem, "fields" ) ).length, is( 0 ) );
783b85
-        assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
783b85
-    }
783b85
-
783b85
-    public void testNotInterpolateFile()
783b85
-            throws Exception
783b85
-    {
783b85
-        Model model = new Model();
783b85
-
783b85
-        File baseDir = new File( System.getProperty( "user.dir" ) );
783b85
-
783b85
-        Properties p = new Properties();
783b85
-
783b85
-        StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
783b85
-
783b85
-        ModelBuildingRequest config = createModelBuildingRequest( p );
783b85
-
783b85
-        SimpleProblemCollector collector = new SimpleProblemCollector();
783b85
-        interpolator.interpolateObject( baseDir, model, new File( "." ), config, collector );
783b85
-        assertProblemFree( collector );
783b85
-
783b85
-        //noinspection unchecked
783b85
-        Map<Class<?>, ?> cache =
783b85
-                (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
783b85
-                        .get( null );
783b85
-
783b85
-        Object fileCacheItem = cache.get( File.class );
783b85
-
783b85
-        assertNotNull( fileCacheItem );
783b85
-
783b85
-        assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
783b85
-    }
783b85
-
783b85
-
783b85
     public void testConcurrentInterpolation()
783b85
         throws Exception
783b85
     {
783b85
-- 
783b85
2.21.0
783b85