JerseyTest: how to bind to Set<Integer>

118 Views Asked by At

When testing with JerseyTest, I am having trouble to bind to a:

@Inject
@SomeQualifier
private Set<Integer> aSet;

It works with the following binding:

bind(Collections.EMPTY_SET).to(Set.class).qualifiedBy(new SomeQualifierLiteral());

ONLY when the field is without the generic, e.g. private Set aSet;

How can I make a successful bind if a generic is present on the field definition?

1

There are 1 best solutions below

0
daloem On BEST ANSWER

answered by @PaulSamsotha in his comment.