@Test public void testUnsetSeparatorThrowsRuntimeException() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); try { fSDMsg.unsetSeparator("testFSDMsgSeparatorName"); fail("Expected RuntimeException to be thrown"); } catch (RuntimeException ex) { assertEquals( "ex.getMessage()", "unsetSeparator was attempted for testFSDMsgSeparatorName which was not previously defined.", ex.getMessage()); } }
@Test public void testUnsetSeparator() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); fSDMsg.unsetSeparator("US"); assertFalse("fSDMsg.separators.containsKey(\"US\")", fSDMsg.separators.containsKey("US")); }