How to use MessagesApi in a static context in java in upgrading from 2.4 to 2.5 play

We are upgrading from 2.4 to 2.5 the play framework, and Formats.DateFormatter has changed the signature from String to MessagesApi,String so i’m wondering
how to use MessageApi in a static class to call Formats.DateFormatter? we can’t inject MessageApi.

Regards and THanks
Nuno Gonçalves