MetadataFileNameCreator implements FileNameCreator { public void setDefaultName(String s) { defaultName = Args.notBlank(s, "defaultName"); } MetadataFileNameCreator();  MetadataFileNameCreator(String metadataKey);  MetadataFileNameCreator(String metadataKey, String defaultName); @Override String createName(AdaptrisMessage msg); String getMetadataKey(); void setMetadataKey(String s); String getDefaultName(); void setDefaultName(String s);  }
@Test public void testSetDefaultName() throws Exception { MetadataFileNameCreator fnc = new MetadataFileNameCreator("key"); try { fnc.setDefaultName(null); fail(); } catch (IllegalArgumentException expected) { } try { fnc.setDefaultName(""); fail(); } catch (IllegalArgumentException expected) { } }