BUG: Problem running masquerade tests on pages with date types

I’m currently writing some masquerade tests, but when a table is created with dates in it, then the DateFormatter crashes, and so then does the test.

I get the error

Caused by: java.lang.IllegalArgumentException: Unknown pattern letter: t

After debugging and going up the call chain, the problem is that a call is made to get a FormatStrings object, using locale “en”, which returns a formatStrings object containing some default formats, including a dateFormat set to “dateFormat”.

This then gets used in the datetimeFormatter, which then causes the “unknown pattern letter: t” exception.

Is there any way around this, so that the broken formatStrings object is not used?

(My next step will be to try and force the java locale to another locale, so that the broken formatStrings map is not used, but this might be something for someone to look at in general!)

I managed to fix it for my own case by including a default formatter for the column, in the screen definition xml file…

<column id="eom">
    <formatter>
       <date format="dd.MM.yyyy"/>
    </formatter>
</column>

EDIT:
Found the actual correct solution, which was to include a copy of messages.properties with the relevant formats in the test dir!