Gary,
I just pulled an example:
https://github.com/calcacuervo/JBPM5-Samples/blob/master/bpmn-examples/src/test/java/com/test/Jbpm5ExamplesTest.java
That uses a service task with a POJO. It is the same than the example in jbpm, but with custom intput/output.
You can check it and compare.
If you still have the problem, you can make a simple project with a test that fails with your implementation and we can take a look.
Demian