@Test
public void testLoadMetadataForPolicy(){

    JsonFileUtils jsonFileUtils = mock(JsonFileUtils.class);
    Set<DefaultMetadata> metadataSet = new HashSet<>();
    DefaultMetadata policyMetadata =  new DefaultMetadata();
    policyMetadata.setName("TestPolicy");
    policyMetadata.setType(EntityTypes.POLICY_TYPE);
    policyMetadata.setId("testId");
    policyMetadata.setGuid("testGuid");
    metadataSet.add(policyMetadata);
    BundleDefinedEntities bundleDefinedEntities = new BundleDefinedEntities();
    bundleDefinedEntities.setDefinedEntities(metadataSet);
    when(jsonFileUtils.readBundleMetadataFile(any(File.class))).thenReturn(bundleDefinedEntities);
    EntityBundleLoader loader = new EntityBundleLoader(documentTools, registry, jsonFileUtils);
    Bundle bundle = loader.loadMetadata(mock(File.class), BundleLoadingOperation.EXPORT);
    Map<String, Policy> policyMap = bundle.getPolicies();
    assertNotNull(policyMap.get("TestPolicy"));
}