@Test
void buildBundleWithDependency() {

    Policy policy = new Policy();
    policy.setName("from-file");
    when(entityLoaderRegistry.getEntityLoaders()).thenReturn(Collections.singleton(new TestPolicyLoader(policy)));
    List<DependentBundle> dummyList = new ArrayList<>();
    dummyList.add(new DependentBundle(new File("test.bundle")));
    Bundle dependencyBundle = new Bundle();
    when(bundleCache.getBundleFromFile(any(File.class))).thenReturn(dependencyBundle);
    BundleFileBuilder bundleFileBuilder = Mockito.spy(new BundleFileBuilder(documentTools, documentFileUtils,
            jsonFileUtils, entityLoaderRegistry, bundleEntityBuilder, bundleCache));
    bundleFileBuilder.buildBundle(new File("input"), new File("output"), dummyList, projectInfo);
    Assert.assertNotNull(dependencyBundle.getDependentBundleFrom());
}