public void testProductNoPool() {
try {
Consumer c = mock(Consumer.class);
Owner o = mock(Owner.class);
SubscriptionServiceAdapter sa = mock(SubscriptionServiceAdapter.class);
Entitler e = mock(Entitler.class);
ConsumerCurator cc = mock(ConsumerCurator.class);
String[] prodIds = {"notthere"};
when(c.getOwner()).thenReturn(o);
when(sa.hasUnacceptedSubscriptionTerms(eq(o))).thenReturn(false);
when(cc.verifyAndLookupConsumer(eq("fakeConsumer"))).thenReturn(c);
when(e.bindByProducts(any(AutobindData.class)))
.thenThrow(new RuntimeException());
ConsumerResource cr = new ConsumerResource(cc, null,
null, sa, null, null, null, i18n, null, null, null, null, null,
null, null, null, null, null, e, null, null, null, null,