Take Formats bigDecimal setting into account when parsing. Removed some redundancy in tests.