Container container = mock(Container.class);
when(container.instanceFor(JSONSerialization.class)).thenReturn(jsonSerialization);
when(container.instanceFor(XMLSerialization.class)).thenReturn(xmlSerialization);
MockLocalization mockLocalization = new MockLocalization(new SingletonResourceBundle("message.cat", "Just another {0} in {1}"));
serialization = new I18nMessageSerialization(container , mockLocalization);
}