@Test
public void testExecute_withoutDataSource() throws Exception {

	// Prepare the mock
	PruneHistoryCommand pruneHistoryCmd = new PruneHistoryCommand();
	pruneHistoryCmd.bundleContext = Mockito.mock( BundleContext.class );
	Mockito.when( pruneHistoryCmd.bundleContext.getServiceReferences(
			DataSource.class,
			"(dataSourceName=roboconf-dm-db)" )).thenReturn( new ArrayList<ServiceReference<DataSource>>( 0 ));
	// Invalid argument? => Nothing is deleted.
	ByteArrayOutputStream os = new ByteArrayOutputStream();
	pruneHistoryCmd.out = new PrintStream( os, true, "UTF-8" );
	pruneHistoryCmd.execute();
	Assert.assertEquals( os.toString( "UTF-8" ).trim(), "No data source was found to prune the commands history." );
}