See https://github.com/aledsage/brooklyn/commit/25fb219b51a8a35786a166703ab579818238b6f8 for a fix.
This is bundled in the pull request https://github.com/brooklyncentral/brooklyn/pull/787; I'll merge yours first given you've converted the test to java. And then deal with conflict in mine as a separate pull request...