Hi everyone,

I want to know how to write a unit test for method that take org.w3c.dom.Node as its parameter and returns an Object.

here is the code
public static Object unmarshall(Node src) throws IllegalArgumentException {

Object obj = null;
try {
JAXBContext jc = JAXBContext.newInstance("com.test.xml");
Unmarshaller um = jc.createUnmarshaller();
obj = um.unmarshal(src);

} catch (Exception e) {
throw new IllegalArgumentException(e.getMessage());
Logger.message(JaxbSerializer.class, "unmarshall sucess");
return obj;


Thanks in advance