final Properties props = new Properties();
props.setProperty( "groupId", "other.id" );
model.setProperties( props );
final Assembly assembly = new Assembly();
assembly.setId( "assembly.${groupId}" );
final MockManager mm = new MockManager();
final MockControl sessionControl = MockClassControl.createControl( MavenSession.class );
final MavenSession session = (MavenSession) sessionControl.getMock();
mm.add( sessionControl );
final Properties execProps = new Properties();
execProps.setProperty( "groupId", "still.another.id" );
session.getExecutionProperties();
sessionControl.setReturnValue( execProps, MockControl.ZERO_OR_MORE );
session.getUserProperties();
sessionControl.setReturnValue( new Properties(), MockControl.ZERO_OR_MORE );
final MockControl csControl = MockControl.createControl( AssemblerConfigurationSource.class );
final AssemblerConfigurationSource cs = (AssemblerConfigurationSource) csControl.getMock();
mm.add( csControl );
final MockControl lrCtl = MockControl.createControl( ArtifactRepository.class );
final ArtifactRepository lr = (ArtifactRepository) lrCtl.getMock();
mm.add( lrCtl );
lr.getBasedir();
lrCtl.setReturnValue( "/path/to/local/repo", MockControl.ZERO_OR_MORE );
cs.getLocalRepository();
csControl.setReturnValue( lr, MockControl.ZERO_OR_MORE );
cs.getMavenSession();
csControl.setReturnValue( session, MockControl.ZERO_OR_MORE );
mm.replayAll();
final Assembly result = interpolator.interpolate( assembly, new MavenProject( model ), cs );
assertEquals( "assembly.still.another.id", result.getId() );
mm.verifyAll();
mm.clear();
}