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