best thing you can do is to create a pullrequest with a test failing and the change that fixes it - makes it much easier to comment on your exact code question.
note, it sounds like you are on the right direction.
Reply to this message by going to Community
Start a new discussion in JBoss Tools at Community