Added tests for applyFormat()