@Test
public void testAnnotatedEncassMetadata_ExcludingOptionalAnnotationFields() throws JsonProcessingException {

            BundleEntityBuilder builder = createBundleEntityBuilder();
    Bundle bundle = createBundle(ENCASS_POLICY_WITH_ENV_DEPENDENCIES, true, true, true, projectInfo);
    Encass encass = buildTestEncassWithAnnotation(TEST_GUID, TEST_ENCASS_POLICY, true);
    encass.getAnnotations().forEach(a -> {
        a.setId(null);
        a.setName(null);
        a.setDescription(null);
        a.setTags(Collections.emptySet());
    });
    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("my-bundle-" + encass.getName() + "-1.0").getBundleMetadata();
    assertNotNull(metadata);
    assertNotNull(metadata.getDefinedEntities().iterator().next().getId());
    assertEquals("my-bundle-" + encass.getName(), metadata.getName());
    assertEquals(encass.getProperties().get("description"), metadata.getDescription());
    assertEquals(0, metadata.getTags().size());
    verifyAnnotatedEncassBundleMetadata(bundles, bundle, encass, true, true, true);
}