@Test
public void testGetExtensionBundlesWithFilterParams() {

    final Set<String> bucketIds = new HashSet<>();
    bucketIds.add("1");
    bucketIds.add("2");
    bucketIds.add("3");
    final List<BundleEntity> bundles = metadataService.getBundles(bucketIds,
            BundleFilterParams.empty());
    assertNotNull(bundles);
    assertEquals(3, bundles.size());
    final List<BundleEntity> bundles2 = metadataService.getBundles(bucketIds,
            BundleFilterParams.of("org.apache.nifi", null));
    assertNotNull(bundles2);
    assertEquals(2, bundles2.size());
    final List<BundleEntity> bundles3 = metadataService.getBundles(bucketIds,
            BundleFilterParams.of("org.apache.%", null));
    assertNotNull(bundles3);
    assertEquals(2, bundles3.size());
    final List<BundleEntity> bundles4 = metadataService.getBundles(bucketIds,
            BundleFilterParams.of("org.apache.nifi", "nifi-example-processors-nar"));
    assertNotNull(bundles4);
    assertEquals(1, bundles4.size());
    final List<BundleEntity> bundles5 = metadataService.getBundles(bucketIds,
            BundleFilterParams.of("org.apache.nifi", "nifi-example-processors-%"));
    assertNotNull(bundles5);
    assertEquals(1, bundles5.size());
    final List<BundleEntity> bundles6 = metadataService.getBundles(bucketIds,
            BundleFilterParams.of(null, "nifi-example-processors-%"));
    assertNotNull(bundles6);
    assertEquals(1, bundles6.size());
    final List<BundleEntity> bundles7 = metadataService.getBundles(bucketIds,
            BundleFilterParams.of("Bucket %", null, "nifi-example-processors-%"));
    assertNotNull(bundles7);
    assertEquals(1, bundles7.size());
}