@Test
public void testSplitNicely() {

	List<String> result = Utils.splitNicely( "once, upon, a , time   ", "," );
	Assert.assertEquals( 4, result.size());
	Assert.assertEquals( "once", result.get( 0 ));
	Assert.assertEquals( "upon", result.get( 1 ));
	Assert.assertEquals( "a", result.get( 2 ));
	Assert.assertEquals( "time", result.get( 3 ));
	result = Utils.splitNicely( "once \n\n, upon, a , time \n  ", "\n" );
	Assert.assertEquals( 4, result.size());
	Assert.assertEquals( "once", result.get( 0 ));
	Assert.assertEquals( "", result.get( 1 ).trim());
	Assert.assertEquals( ", upon, a , time", result.get( 2 ));
	Assert.assertEquals( "", result.get( 3 ).trim());
	result = Utils.splitNicely( "once $ $a$ $$ time", "$" );
	Assert.assertEquals( 6, result.size());
	Assert.assertEquals( "once", result.get( 0 ));
	Assert.assertEquals( "", result.get( 1 ).trim());
	Assert.assertEquals( "a", result.get( 2 ));
	Assert.assertEquals( "", result.get( 3 ).trim());
	Assert.assertEquals( "", result.get( 4 ).trim());
	Assert.assertEquals( "time", result.get( 5 ));
}