@Test
public void testAnnotatedServiceMetadata() throws JsonProcessingException {

    BundleEntityBuilder builder = createBundleEntityBuilder();
    Bundle bundle = createBundleForService(true);
    Service service = buildTestServiceWithAnnotation(TEST_SERVICE, TEST_SERVICE_ID, TEST_SERVICE);
    bundle.getServices().put(TEST_SERVICE, service);
    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_SERVICE_ANNOTATION_NAME + "-1.0").getBundleMetadata();
    assertNotNull(metadata);
    assertTrue(metadata.isHasRouting());
    assertEquals(TEST_SERVICE_ANNOTATION_NAME, metadata.getName());
    assertEquals(TEST_SERVICE_ANNOTATION_DESC, metadata.getDescription());
    assertEquals(TEST_SERVICE_ANNOTATION_TAGS, metadata.getTags());
    assertFalse(metadata.isL7Template());
    verifyAnnotatedServiceBundleMetadata(bundles, bundle, service, false, true, true);
}