AdaptrisMessageFactory { public static AdaptrisMessageFactory getDefaultInstance() { return DEFAULT_INSTANCE; }  static AdaptrisMessageFactory getDefaultInstance(); static AdaptrisMessageFactory defaultIfNull(AdaptrisMessageFactory f); abstract AdaptrisMessage newMessage(byte[] payload, Set metadata); abstract AdaptrisMessage newMessage(byte[] payload); abstract AdaptrisMessage newMessage(String payload, Set metadata); abstract AdaptrisMessage newMessage(String payload); abstract AdaptrisMessage newMessage(String payload,
                                             String charEncoding, Set metadata); abstract AdaptrisMessage newMessage(String payload, String charEncoding); abstract AdaptrisMessage newMessage(AdaptrisMessage source, Collection<String> metadataKeysToPreserve); abstract String getDefaultCharEncoding(); abstract void setDefaultCharEncoding(String s); abstract AdaptrisMessage newMessage(); IdGenerator getUniqueIdGenerator(); void setUniqueIdGenerator(IdGenerator s);  }
@Test public void testGetDefaultInstance() { AdaptrisMessageFactory m1 = AdaptrisMessageFactory.getDefaultInstance(); assertNotNull(m1); assertNotNull(m1.newMessage()); AdaptrisMessageFactory m2 = AdaptrisMessageFactory.getDefaultInstance(); assertNotNull(m2); assertEquals(m1, m2); }