From 91c03c44230d9bc19f53ee487f6ac2926e89c05e Mon Sep 17 00:00:00 2001 From: Areek Zillur Date: Wed, 1 Jun 2016 03:00:55 -0400 Subject: [PATCH] modify license manager interface to return current license state Original commit: elastic/x-pack-elasticsearch@9fee416239d63bd92c251cf3bdaba16a6839a04c --- .../plugin/core/LicensesManagerService.java | 4 +-- .../license/plugin/core/LicensesService.java | 11 +++--- ...nsesConsumerPluginIntegrationTestCase.java | 28 +++++++-------- .../AbstractLicensesIntegrationTestCase.java | 6 ++-- .../LicensesPluginIntegrationTests.java | 28 +++++++-------- .../LicensesPluginsIntegrationTests.java | 36 +++++++++---------- .../plugin/LicensesServiceClusterTests.java | 3 +- .../collector/AbstractCollectorTestCase.java | 2 +- .../license/LicenseIntegrationTests.java | 8 ++--- 9 files changed, 59 insertions(+), 67 deletions(-) diff --git a/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/core/LicensesManagerService.java b/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/core/LicensesManagerService.java index f80d7dac03f..786f3dd970a 100644 --- a/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/core/LicensesManagerService.java +++ b/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/core/LicensesManagerService.java @@ -12,9 +12,9 @@ import java.util.List; public interface LicensesManagerService { /** - * @return the id of registered licensees currently in state + * @return current {@link LicenseState} */ - List licenseesWithState(LicenseState state); + LicenseState licenseState(); /** * @return the currently active license, or {@code null} if no license is currently installed diff --git a/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/core/LicensesService.java b/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/core/LicensesService.java index 53349ba8ddc..8e99a9c0825 100644 --- a/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/core/LicensesService.java +++ b/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/core/LicensesService.java @@ -348,14 +348,11 @@ public class LicensesService extends AbstractLifecycleComponent } @Override - public List licenseesWithState(LicenseState state) { - List licensees = new ArrayList<>(registeredLicensees.size()); - for (InternalLicensee licensee : registeredLicensees) { - if (licensee.currentLicenseState == state) { - licensees.add(licensee.id()); - } + public LicenseState licenseState() { + if (registeredLicensees.size() > 0) { + return registeredLicensees.get(0).currentLicenseState; } - return licensees; + return null; } @Override diff --git a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/AbstractLicensesConsumerPluginIntegrationTestCase.java b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/AbstractLicensesConsumerPluginIntegrationTestCase.java index 29ad100cea1..acd37845b1e 100644 --- a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/AbstractLicensesConsumerPluginIntegrationTestCase.java +++ b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/AbstractLicensesConsumerPluginIntegrationTestCase.java @@ -69,16 +69,16 @@ public abstract class AbstractLicensesConsumerPluginIntegrationTestCase extends logger.info("using {} consumer plugin", consumerPlugin.getClass().getName()); logger.info(" --> trial license generated"); // managerService should report feature to be enabled on all data nodes - assertLicenseeState(consumerPlugin.id(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); // consumer plugin service should return enabled on all data nodes assertConsumerPluginNotification(consumerPluginServices(), LicenseState.ENABLED, 2); logger.info(" --> check trial license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired trial license) assertConsumerPluginNotification(consumerPluginServices(), LicenseState.GRACE_PERIOD, trialLicenseDurationInSeconds * 2); - assertLicenseeState(consumerPlugin.id(), LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); assertConsumerPluginNotification(consumerPluginServices(), LicenseState.DISABLED, trialLicenseDurationInSeconds * 2); - assertLicenseeState(consumerPlugin.id(), LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); logger.info(" --> put signed license"); putLicense(TimeValue.timeValueSeconds(trialLicenseDurationInSeconds)); @@ -86,35 +86,35 @@ public abstract class AbstractLicensesConsumerPluginIntegrationTestCase extends logger.info(" --> check signed license enabled notification"); // consumer plugin should notify onEnabled on all data nodes (signed license) assertConsumerPluginNotification(consumerPluginServices(), LicenseState.ENABLED, 1); - assertLicenseeState(consumerPlugin.id(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); logger.info(" --> check signed license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired signed license) assertConsumerPluginNotification(consumerPluginServices(), LicenseState.GRACE_PERIOD, trialLicenseDurationInSeconds * 2); - assertLicenseeState(consumerPlugin.id(), LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); assertConsumerPluginNotification(consumerPluginServices(), LicenseState.DISABLED, trialLicenseDurationInSeconds * 2); - assertLicenseeState(consumerPlugin.id(), LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); } public void testTrialLicenseNotification() throws Exception { logger.info(" --> check onEnabled for trial license"); // managerService should report feature to be enabled on all data nodes - assertLicenseeState(consumerPlugin.id(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); // consumer plugin service should return enabled on all data nodes assertConsumerPluginNotification(consumerPluginServices(), LicenseState.ENABLED, 1); logger.info(" --> check trial license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired signed license) assertConsumerPluginNotification(consumerPluginServices(), LicenseState.GRACE_PERIOD, trialLicenseDurationInSeconds); - assertLicenseeState(consumerPlugin.id(), LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); assertConsumerPluginNotification(consumerPluginServices(), LicenseState.DISABLED, trialLicenseDurationInSeconds); - assertLicenseeState(consumerPlugin.id(), LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); } public void testOverlappingTrialAndSignedLicenseNotification() throws Exception { logger.info(" --> check onEnabled for trial license"); // managerService should report feature to be enabled on all data nodes - assertLicenseeState(consumerPlugin.id(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); // consumer plugin service should return enabled on all data nodes assertConsumerPluginNotification(consumerPluginServices(), LicenseState.ENABLED, 1); @@ -124,7 +124,7 @@ public abstract class AbstractLicensesConsumerPluginIntegrationTestCase extends logger.info(" --> check signed license enabled notification"); // consumer plugin should notify onEnabled on all data nodes (signed license) assertConsumerPluginNotification(consumerPluginServices(), LicenseState.ENABLED, 1); - assertLicenseeState(consumerPlugin.id(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); logger.info(" --> sleep for rest of trailLicense duration"); Thread.sleep(trialLicenseDurationInSeconds * 1000L); @@ -132,14 +132,14 @@ public abstract class AbstractLicensesConsumerPluginIntegrationTestCase extends logger.info(" --> check consumer is still enabled [signed license]"); // consumer plugin should notify onEnabled on all data nodes (signed license) assertConsumerPluginNotification(consumerPluginServices(), LicenseState.ENABLED, 1); - assertLicenseeState(consumerPlugin.id(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); logger.info(" --> check signed license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired signed license) assertConsumerPluginNotification(consumerPluginServices(), LicenseState.GRACE_PERIOD, trialLicenseDurationInSeconds * 2 * 2); - assertLicenseeState(consumerPlugin.id(), LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); assertConsumerPluginNotification(consumerPluginServices(), LicenseState.DISABLED, trialLicenseDurationInSeconds * 2 * 2); - assertLicenseeState(consumerPlugin.id(), LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); } private List consumerPluginServices() { diff --git a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/AbstractLicensesIntegrationTestCase.java b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/AbstractLicensesIntegrationTestCase.java index b4c8abb20c2..1ab4321ba92 100644 --- a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/AbstractLicensesIntegrationTestCase.java +++ b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/AbstractLicensesIntegrationTestCase.java @@ -103,11 +103,11 @@ public abstract class AbstractLicensesIntegrationTestCase extends ESIntegTestCas assertThat(putLicenseResponse.status(), equalTo(LicensesStatus.VALID)); } - protected void assertLicenseeState(final String id, final LicenseState state) throws InterruptedException { - assertTrue("LicensesManagerService for licensee " + id + " should have status " + state.name(), awaitBusy(() -> { + protected void assertLicenseeState(final LicenseState state) throws InterruptedException { + assertTrue("license should have status " + state.name(), awaitBusy(() -> { final InternalTestCluster clients = internalCluster(); for (LicensesManagerService managerService : clients.getDataNodeInstances(LicensesManagerService.class)) { - if (!managerService.licenseesWithState(state).contains(id)) { + if (managerService.licenseState() != state) { return false; } } diff --git a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesPluginIntegrationTests.java b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesPluginIntegrationTests.java index 3f1a0539e5c..86a075555d9 100644 --- a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesPluginIntegrationTests.java +++ b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesPluginIntegrationTests.java @@ -65,16 +65,16 @@ public class LicensesPluginIntegrationTests extends AbstractLicensesIntegrationT logger.info("using {} consumer plugin", useEagerLicenseRegistrationPlugin ? "eager" : "lazy"); logger.info(" --> trial license generated"); // managerService should report feature to be enabled on all data nodes - assertLicenseeState(getCurrentFeatureName(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); // consumer plugin service should return enabled on all data nodes assertConsumerPluginEnabledNotification(2); logger.info(" --> check trial license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired trial license) assertConsumerPluginDisabledNotification(trialLicenseDurationInSeconds * 2); - assertLicenseeState(getCurrentFeatureName(), LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); - assertLicenseeState(getCurrentFeatureName(), LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); logger.info(" --> put signed license"); putLicense(TimeValue.timeValueSeconds(trialLicenseDurationInSeconds)); @@ -82,33 +82,33 @@ public class LicensesPluginIntegrationTests extends AbstractLicensesIntegrationT logger.info(" --> check signed license enabled notification"); // consumer plugin should notify onEnabled on all data nodes (signed license) assertConsumerPluginEnabledNotification(1); - assertLicenseeState(getCurrentFeatureName(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); logger.info(" --> check signed license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired signed license) assertConsumerPluginDisabledNotification(trialLicenseDurationInSeconds * 2); - assertLicenseeState(getCurrentFeatureName(), LicenseState.GRACE_PERIOD); - assertLicenseeState(getCurrentFeatureName(), LicenseState.DISABLED); + assertLicenseeState(LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.DISABLED); } public void testTrialLicenseNotification() throws Exception { logger.info(" --> check onEnabled for trial license"); // managerService should report feature to be enabled on all data nodes - assertLicenseeState(getCurrentFeatureName(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); // consumer plugin service should return enabled on all data nodes assertConsumerPluginEnabledNotification(1); logger.info(" --> check trial license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired signed license) assertConsumerPluginDisabledNotification(trialLicenseDurationInSeconds * 2); - assertLicenseeState(getCurrentFeatureName(), LicenseState.GRACE_PERIOD); - assertLicenseeState(getCurrentFeatureName(), LicenseState.DISABLED); + assertLicenseeState(LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.DISABLED); } public void testOverlappingTrialAndSignedLicenseNotification() throws Exception { logger.info(" --> check onEnabled for trial license"); // managerService should report feature to be enabled on all data nodes - assertLicenseeState(getCurrentFeatureName(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); // consumer plugin service should return enabled on all data nodes assertConsumerPluginEnabledNotification(1); @@ -118,7 +118,7 @@ public class LicensesPluginIntegrationTests extends AbstractLicensesIntegrationT logger.info(" --> check signed license enabled notification"); // consumer plugin should notify onEnabled on all data nodes (signed license) assertConsumerPluginEnabledNotification(1); - assertLicenseeState(getCurrentFeatureName(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); logger.info(" --> sleep for rest of trailLicense duration"); Thread.sleep(trialLicenseDurationInSeconds * 1000L); @@ -126,13 +126,13 @@ public class LicensesPluginIntegrationTests extends AbstractLicensesIntegrationT logger.info(" --> check consumer is still enabled [signed license]"); // consumer plugin should notify onEnabled on all data nodes (signed license) assertConsumerPluginEnabledNotification(1); - assertLicenseeState(getCurrentFeatureName(), LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); logger.info(" --> check signed license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired signed license) assertConsumerPluginDisabledNotification(trialLicenseDurationInSeconds * 2 * 2); - assertLicenseeState(getCurrentFeatureName(), LicenseState.GRACE_PERIOD); - assertLicenseeState(getCurrentFeatureName(), LicenseState.DISABLED); + assertLicenseeState(LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.DISABLED); } private String getCurrentFeatureName() { diff --git a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesPluginsIntegrationTests.java b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesPluginsIntegrationTests.java index 657afe6525a..bd20af42f85 100644 --- a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesPluginsIntegrationTests.java +++ b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesPluginsIntegrationTests.java @@ -70,8 +70,8 @@ public class LicensesPluginsIntegrationTests extends AbstractLicensesIntegration logger.info(" --> trial license generated"); // managerService should report feature to be enabled on all data nodes - assertLicenseeState(ID_1, LicenseState.ENABLED); - assertLicenseeState(ID_2, LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); // consumer plugin service should return enabled on all data nodes assertEagerConsumerPluginNotification(LicenseState.ENABLED, 1); assertLazyConsumerPluginNotification(LicenseState.ENABLED, 1); @@ -80,10 +80,10 @@ public class LicensesPluginsIntegrationTests extends AbstractLicensesIntegration // consumer plugin should notify onDisabled on all data nodes (expired trial license) assertEagerConsumerPluginNotification(LicenseState.GRACE_PERIOD, trialLicenseDurationInSec * 2); assertLazyConsumerPluginNotification(LicenseState.GRACE_PERIOD, trialLicenseDurationInSec * 2); - assertLicenseeState(ID_1, LicenseState.GRACE_PERIOD); - assertLicenseeState(ID_2, LicenseState.GRACE_PERIOD); - assertLicenseeState(ID_1, LicenseState.DISABLED); - assertLicenseeState(ID_2, LicenseState.DISABLED); + assertLicenseeState(LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); logger.info(" --> put signed license"); putLicense(TimeValue.timeValueSeconds(signedLicenseDuration)); @@ -92,20 +92,20 @@ public class LicensesPluginsIntegrationTests extends AbstractLicensesIntegration // consumer plugin should notify onEnabled on all data nodes (signed license) assertEagerConsumerPluginNotification(LicenseState.ENABLED, 1); assertLazyConsumerPluginNotification(LicenseState.ENABLED, 1); - assertLicenseeState(ID_1, LicenseState.ENABLED); - assertLicenseeState(ID_2, LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); logger.info(" --> check signed license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired signed license) assertEagerConsumerPluginNotification(LicenseState.GRACE_PERIOD, signedLicenseDuration * 2); assertLazyConsumerPluginNotification(LicenseState.GRACE_PERIOD, signedLicenseDuration * 2); - assertLicenseeState(ID_1, LicenseState.GRACE_PERIOD); - assertLicenseeState(ID_2, LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); assertEagerConsumerPluginNotification(LicenseState.DISABLED, 10 * 2); assertLazyConsumerPluginNotification(LicenseState.DISABLED, 10 * 2); - assertLicenseeState(ID_1, LicenseState.DISABLED); - assertLicenseeState(ID_2, LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); } public void testRandomFeatureLicensesActions() throws Exception { @@ -116,19 +116,19 @@ public class LicensesPluginsIntegrationTests extends AbstractLicensesIntegration logger.info(" --> check license enabled notification"); assertEagerConsumerPluginNotification(LicenseState.ENABLED, 1); assertLazyConsumerPluginNotification(LicenseState.ENABLED, 1); - assertLicenseeState(ID_1, LicenseState.ENABLED); - assertLicenseeState(ID_2, LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); logger.info(" --> check license expiry notification"); // consumer plugin should notify onDisabled on all data nodes (expired signed license) assertEagerConsumerPluginNotification(LicenseState.GRACE_PERIOD, 10 * 2); assertLazyConsumerPluginNotification(LicenseState.GRACE_PERIOD, 10 * 2); - assertLicenseeState(ID_1, LicenseState.GRACE_PERIOD); - assertLicenseeState(ID_2, LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); + assertLicenseeState(LicenseState.GRACE_PERIOD); assertEagerConsumerPluginNotification(LicenseState.DISABLED, 10 * 2); assertLazyConsumerPluginNotification(LicenseState.DISABLED, 10 * 2); - assertLicenseeState(ID_1, LicenseState.DISABLED); - assertLicenseeState(ID_2, LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); + assertLicenseeState(LicenseState.DISABLED); } private void startNodesWithConsumerPlugins(int nNodes, int trialLicenseDuration) { diff --git a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesServiceClusterTests.java b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesServiceClusterTests.java index f65862a3c64..89f1a156ffe 100644 --- a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesServiceClusterTests.java +++ b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/LicensesServiceClusterTests.java @@ -26,7 +26,6 @@ import org.elasticsearch.license.plugin.consumer.LazyLicenseRegistrationPluginSe import org.elasticsearch.license.plugin.core.LicenseState; import org.elasticsearch.license.plugin.core.LicensesMetaData; import org.elasticsearch.license.plugin.core.LicensesStatus; -import org.elasticsearch.node.Node; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.xpack.XPackPlugin; @@ -219,7 +218,7 @@ public class LicensesServiceClusterTests extends AbstractLicensesIntegrationTest private void assertLicenseesStateEnabled() throws Exception { for (String id : PLUGINS) { - assertLicenseeState(id, LicenseState.ENABLED); + assertLicenseeState(LicenseState.ENABLED); } } diff --git a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/agent/collector/AbstractCollectorTestCase.java b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/agent/collector/AbstractCollectorTestCase.java index ff72a714fc7..81b73d56ecb 100644 --- a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/agent/collector/AbstractCollectorTestCase.java +++ b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/agent/collector/AbstractCollectorTestCase.java @@ -247,7 +247,7 @@ public abstract class AbstractCollectorTestCase extends MarvelIntegTestCase { private volatile License license; @Override - public List licenseesWithState(LicenseState state) { + public LicenseState licenseState() { return null; } diff --git a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/license/LicenseIntegrationTests.java b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/license/LicenseIntegrationTests.java index c574e3f4912..b02c58137e1 100644 --- a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/license/LicenseIntegrationTests.java +++ b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/license/LicenseIntegrationTests.java @@ -146,12 +146,8 @@ public class LicenseIntegrationTests extends MarvelIntegTestCase { } @Override - public List licenseesWithState(LicenseState state) { - List licenseesWithState = new ArrayList<>(); - for (Licensee licensee : licensees) { - licenseesWithState.add(licensee.id()); - } - return licenseesWithState; + public LicenseState licenseState() { + return null; } @Override