@Test
public void testAnnotatedEncassMetadata() throws JsonProcessingException {

    BundleEntityBuilder builder = createBundleEntityBuilder();
    Bundle bundle = createBundle(ENCASS_POLICY_WITH_ENV_DEPENDENCIES, true, true, false, projectInfo);
    Encass encass = buildTestEncassWithAnnotation(TEST_GUID, TEST_ENCASS_POLICY, false);
    bundle.putAllEncasses(ImmutableMap.of(TEST_ENCASS, encass));
    Map<String, BundleArtifacts> bundles = builder.build(bundle, EntityBuilder.BundleType.DEPLOYMENT,
            DocumentTools.INSTANCE.getDocumentBuilder().newDocument(), projectInfo);
    assertNotNull(bundles);
    assertEquals(1, bundles.size());
    BundleMetadata metadata = bundles.get(TEST_ENCASS_ANNOTATION_NAME + "-1.0").getBundleMetadata();
    assertNotNull(metadata);
    assertEquals(TEST_ENCASS_ANNOTATION_NAME, metadata.getName());
    assertEquals(TEST_ENCASS_ANNOTATION_DESC, metadata.getDescription());
    assertEquals(TEST_ENCASS_ANNOTATION_TAGS, metadata.getTags());
    assertTrue(metadata.isL7Template());
    verifyAnnotatedEncassBundleMetadata(bundles, bundle, encass, false, false, true);
}