### Question:
StringSearchModelInterpolator extends AbstractStringBasedModelInterpolator { void interpolateObject( Object obj, Model model, File projectDir, ModelBuildingRequest config, ModelProblemCollector problems ) { List<? extends ValueSource> valueSources = createValueSources( model, projectDir, config, problems ); List<? extends InterpolationPostProcessor> postProcessors = createPostProcessors( model, projectDir, config ); InnerInterpolator innerInterpolator = createInterpolator( valueSources, postProcessors, problems ); PrivilegedAction<Object> action = new InterpolateObjectAction( obj, innerInterpolator, problems ); AccessController.doPrivileged( action ); }  @Override Model interpolateModel( Model model, File projectDir, ModelBuildingRequest config,
                                   ModelProblemCollector problems );  }### Answer:
@Test public void testFinalFieldsExcludedFromInterpolation() { Properties props = new Properties(); props.setProperty( "expression", "value" ); DefaultModelBuildingRequest request = new DefaultModelBuildingRequest(); request.setUserProperties( props ); SimpleProblemCollector problems = new SimpleProblemCollector(); StringSearchModelInterpolator interpolator = new StringSearchModelInterpolator(); interpolator.interpolateObject( new ClassWithFinalField(), new Model(), null, request, problems ); assertProblemFree( problems ); }
@Test public void locationTrackerShouldBeExcludedFromInterpolation() { Properties props = new Properties(); props.setProperty( "expression", "value" ); DefaultModelBuildingRequest request = new DefaultModelBuildingRequest(); request.setUserProperties( props ); InputSource source = new InputSource(); source.setLocation( "${expression}" ); source.setModelId( "${expression}" ); Model model = new Model(); model.setLocation( "", new InputLocation( 1, 1, source ) ); SimpleProblemCollector problems = new SimpleProblemCollector(); StringSearchModelInterpolator interpolator = new StringSearchModelInterpolator(); interpolator.interpolateObject( model, model, null, request, problems ); assertProblemFree( problems ); assertEquals( "${expression}", source.getLocation() ); assertEquals( "${expression}", source.getModelId() ); }