@Test public void testMandatoryProperties() throws Exception { try { mapper.afterPropertiesSet(); fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException e) { // expected } }