@Test
public void testSeveralVersionsOfRoboconf() throws Exception {

	Map<String,String> versionToBundle = new LinkedHashMap<> ();
	versionToBundle.put( "2.0", "whatever" );
	versionToBundle.put( "5.1", "bundle 1" );
	versionToBundle.put( "0.8", Constants.RBCF_CORE_SYMBOLIC_NAME );
	versionToBundle.put( "10", "oops" );
	versionToBundle.put( "0.9.1", Constants.RBCF_CORE_SYMBOLIC_NAME );
	versionToBundle.put( "36.5.1", "hey" );
	List<Bundle> bundles = new ArrayList<> ();
	for( Map.Entry<String,String> entry : versionToBundle.entrySet()) {
		Bundle bundleMock = Mockito.mock( Bundle.class );
		Mockito.when( bundleMock.getSymbolicName()).thenReturn( entry.getValue());
		Version v = Mockito.mock( Version.class );
		Mockito.when( v.toString()).thenReturn( entry.getKey());
		Mockito.when( bundleMock.getVersion()).thenReturn( v );
		bundles.add( bundleMock );
	}
	Mockito.when( this.ctx.getBundles()).thenReturn( bundles.toArray( new Bundle[ bundles.size()]));
	this.cmd.execute();
	String outputText = filterOutput( this.os.toString( "UTF-8" ));
	Assert.assertTrue( outputText.endsWith( "\n Roboconf versions 0.8\n 0.9.1" ));
	Assert.assertTrue( outputText.startsWith( "Roboconf\n\n[ WARNING ] " ));
	Mockito.verify( this.session, Mockito.only()).execute( RoboconfInfoCommand.KARAF_INFO );
	Mockito.verify( this.ctx, Mockito.only()).getBundles();
}