private static final String INVALID_EXAMPLE_DOMAIN_NAME =
". an invalid. example.net";
@Test()
public void testExceptionMessageContainsDomain() {
MxLookup mxLookup =
new MxLookup(new Domain(INVALID_EXAMPLE_DOMAIN_NAME));
try {
mxLookup.queryMxTargets();
} catch (MxLookupException e) {
assertTrue(e.getMessage().contains(INVALID_EXAMPLE_DOMAIN_NAME));
return;
}
fail("An exception should have been thrown");