public void testShouldOutputBoolean() throws Exception {
Converter serializer = new BooleanConverter();
assertEquals("<boolean>1</boolean>", marshal(serializer, Boolean.TRUE));
assertEquals("<boolean>0</boolean>", marshal(serializer, Boolean.FALSE));
assertTrue(serializer.canConvert(Boolean.class));
assertFalse(serializer.canConvert(Long.class));
}
public void testMethodInvokation() throws Exception {
Calculator c = new Calculator();
Method method = c.getClass().getMethod("sum", new Class[]{double.class, double.class});