@Test
public void textInvalidInput() {

    TestResourceBundle bundle = new TestResourceBundle();
    bundle.getResourcesMap().put("test.key", "foo");
    Resources resources = new Resources(bundle);
    assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> resources.text(null, new Object[0]));
    assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> resources.text("missing.key",
            (Object[]) null));
    assertThatExceptionOfType(MissingResourceException.class).isThrownBy(() -> resources.text("missing.key",
            new Object[0]));
}