@Test
public void testContentExtentionIncludesPromotedContent()
throws CertificateSizeException {
// Environment, with promoted content:
Environment e = new Environment("env1", "Env 1", owner);
e.getEnvironmentContent().add(new EnvironmentContent(e, content.getId(), true));
when(entitlement.getConsumer().getEnvironment()).thenReturn(e);
Map<String, EnvironmentContent> promotedContent =
new HashMap<String, EnvironmentContent>();
promotedContent.put(content.getId(), e.getEnvironmentContent().iterator().next());
Set<X509ExtensionWrapper> contentExtensions = extensionUtil
.contentExtensions(product.getProductContent(), null,
promotedContent, entitlement.getConsumer());
Map<String, X509ExtensionWrapper> encodedContent = getEncodedContent(
contentExtensions);