@Test
public void testGetExtensionBundleVersionsWithFilterParams() {

    final Set<String> bucketIds = new HashSet<>();
    bucketIds.add("1");
    bucketIds.add("2");
    bucketIds.add("3");
    final List<BundleVersionEntity> versionEntities = metadataService.getBundleVersions(
            bucketIds, BundleVersionFilterParams.of("org.apache.nifi", null, null));
    assertEquals(2, versionEntities.size());
    versionEntities.forEach(bve -> {
        assertNotNull(bve.getGroupId());
        assertNotNull(bve.getArtifactId());
    });
    final List<BundleVersionEntity> versionEntities2 = metadataService.getBundleVersions(
            bucketIds, BundleVersionFilterParams.of("org.apache.%", null, null));
    assertEquals(2, versionEntities2.size());
    final List<BundleVersionEntity> versionEntities3 = metadataService.getBundleVersions(
            bucketIds, BundleVersionFilterParams.of("org.apache.nifi", "nifi-example-processors-nar", null));
    assertEquals(1, versionEntities3.size());
    final List<BundleVersionEntity> versionEntities4 = metadataService.getBundleVersions(
            bucketIds, BundleVersionFilterParams.of("org.apache.nifi", "nifi-example-processors-%", null));
    assertEquals(1, versionEntities4.size());
    final List<BundleVersionEntity> versionEntities5 = metadataService.getBundleVersions(
            bucketIds, BundleVersionFilterParams.of("org.apache.nifi", "nifi-example-processors-nar", "1.0.0"));
    assertEquals(1, versionEntities5.size());
    final List<BundleVersionEntity> versionEntities6 = metadataService.getBundleVersions(
            bucketIds, BundleVersionFilterParams.of("org.apache.nifi", "nifi-example-processors-nar", "1.0.%"));
    assertEquals(1, versionEntities6.size());
    final List<BundleVersionEntity> versionEntities7 = metadataService.getBundleVersions(
            bucketIds, BundleVersionFilterParams.of("org.apache.nifi", "nifi-example-processors-nar", "NOT-FOUND"));
    assertEquals(0, versionEntities7.size());
}