Junit tests for Format.java