Add tests to setFormat