@Test
public void testStoreDirectoryResourcesAsBytes_withExclusionPatterns() throws Exception {

	File dir = this.folder.newFolder();
	Assert.assertTrue( new File( dir, "dir1/dir2" ).mkdirs());
	Assert.assertTrue( new File( dir, "dir1/dir2/t1.txt" ).createNewFile());
	Assert.assertTrue( new File( dir, "dir1/dir2/t2.toto" ).createNewFile());
	Assert.assertTrue( new File( dir, "t3.txt" ).createNewFile());
	Map<String,byte[]> map = Utils.storeDirectoryResourcesAsBytes( dir );
	Assert.assertEquals( 3, map.size());
	Assert.assertTrue( map.containsKey( "dir1/dir2/t1.txt" ));
	Assert.assertTrue( map.containsKey( "dir1/dir2/t2.toto" ));
	Assert.assertTrue( map.containsKey( "t3.txt" ));
	map = Utils.storeDirectoryResourcesAsBytes( dir, Arrays.asList( ".*\\.txt" ));
	Assert.assertEquals( 1, map.size());
	Assert.assertTrue( map.containsKey( "dir1/dir2/t2.toto" ));
	map = Utils.storeDirectoryResourcesAsBytes( dir, Arrays.asList( ".*toto.*" ));
	Assert.assertEquals( 2, map.size());
	Assert.assertTrue( map.containsKey( "dir1/dir2/t1.txt" ));
	Assert.assertTrue( map.containsKey( "t3.txt" ));
	map = Utils.storeDirectoryResourcesAsBytes( dir, Arrays.asList( "dir1" ));
	Assert.assertEquals( 3, map.size());
	Assert.assertTrue( map.containsKey( "dir1/dir2/t1.txt" ));
	Assert.assertTrue( map.containsKey( "dir1/dir2/t2.toto" ));
	Assert.assertTrue( map.containsKey( "t3.txt" ));
}