@Test public void cannotAddNullFormatAttribute() { try { Library.newBuilder().addFormatAttribute("foo", null); fail("No exception thrown!!"); } catch (NullPointerException e) { assertEquals(e.getMessage(), BUNDLE.getKey("nullAttribute")); } }
@Test public void cannotRemoveFormatAttributeWithNullName() { try { Library.newBuilder().removeFormatAttribute(null); fail("No exception thrown!!"); } catch (NullPointerException e) { assertEquals(e.getMessage(), BUNDLE.getKey("nullFormat")); } }
@Test public void cannotRemoveNullKeyword() { try { Library.newBuilder().removeKeyword(null); fail("No exception thrown!!"); } catch (NullPointerException e) { assertEquals(e.getMessage(), BUNDLE.getKey("nullName")); } }