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);
ConsumerInstalledProduct cip = mock(ConsumerInstalledProduct.class);
Set<ConsumerInstalledProduct> products = new HashSet<ConsumerInstalledProduct>();
products.add(cip);
when(c.getOwner()).thenReturn(o);
when(cip.getProductId()).thenReturn("product-foo");
when(sa.hasUnacceptedSubscriptionTerms(eq(o))).thenReturn(false);
when(cc.verifyAndLookupConsumer(eq("fakeConsumer"))).thenReturn(c);
ConsumerResource cr = new ConsumerResource(cc, null, null, sa,
null, null, null, null, null, null, null, null, null, null,