MappingValidator { public static void validateMappingRequest(Object srcObj) { if (srcObj == null) { MappingUtils.throwMappingException("Source object must not be null"); } } private  MappingValidator(); static void validateMappingRequest(Object srcObj); static void validateMappingRequest(Object srcObj, Object destObj); static void validateMappingRequest(Object srcObj, Class<?> destClass); static URL validateURL(String fileName, BeanContainer beanContainer);  }
@Test(expected = MappingException.class) public void testValidateMappingRequest_NullSrcObj() { MappingValidator.validateMappingRequest(null); }
@Test(expected = MappingException.class) public void testValidateMappingRequest_NullDestObj() { MappingValidator.validateMappingRequest(new Object(), null); }
@Test(expected = MappingException.class) public void testValidateMappingRequest_BothNullObj() { MappingValidator.validateMappingRequest(null, null); }
@Test public void testValidateMappingRequest_OK() { try { MappingValidator.validateMappingRequest(new Object(), new Object()); MappingValidator.validateMappingRequest(new Object(), String.class); } catch (MappingException e) { fail("Not expected"); } }