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