getCacheNames(final String tenant) {
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/DeadEventListener.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/DeadEventListener.java
deleted file mode 100644
index 27e397706..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/DeadEventListener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-import com.google.common.eventbus.DeadEvent;
-import com.google.common.eventbus.Subscribe;
-
-/**
- * Catches all dead events by means of events with no fitting subscriber on the
- * bus.
- *
- *
- *
- */
-@EventSubscriber
-@Service
-public class DeadEventListener {
- private static final Logger LOG = LoggerFactory.getLogger(DeadEventListener.class);
-
- /**
- * Listens for dead vents and prints them into LOG.
- *
- * @param event
- * to print
- */
- @Subscribe
- public void listen(final DeadEvent event) {
- LOG.info("DeadEvent on bus! {}", event.getEvent());
- }
-}
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/EventBusSubscriberProcessor.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/EventBusSubscriberProcessor.java
deleted file mode 100644
index f7ce86ef6..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/EventBusSubscriberProcessor.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus;
-
-import java.lang.reflect.Method;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.config.BeanPostProcessor;
-
-import com.google.common.eventbus.EventBus;
-import com.google.common.eventbus.Subscribe;
-
-/**
- * An {@link BeanPostProcessor} implementation which registers all beans as a
- * event bus subscriber if the classes are annotated with
- * {@link EventSubscriber} and have at least one method annotated with the
- * guava's {@link Subscribe} annoation.
- *
- *
- */
-
-public class EventBusSubscriberProcessor implements BeanPostProcessor {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(EventBusSubscriberProcessor.class);
-
- @Autowired
- private EventBus eventBus;
-
- /*
- * (non-Javadoc)
- *
- * @see org.springframework.beans.factory.config.BeanPostProcessor#
- * postProcessBeforeInitialization (java.lang.Object, java.lang.String)
- */
- @Override
- public Object postProcessBeforeInitialization(final Object bean, final String beanName) {
- return bean;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.springframework.beans.factory.config.BeanPostProcessor#
- * postProcessAfterInitialization( java.lang.Object, java.lang.String)
- */
- @Override
- public Object postProcessAfterInitialization(final Object bean, final String beanName) {
- final Class extends Object> beanClass = bean.getClass();
- final EventSubscriber eventSubscriber = beanClass.getAnnotation(EventSubscriber.class);
- if (eventSubscriber != null) {
- LOGGER.trace("Found bean {} with {} annotation ", bean.getClass().getName(),
- EventSubscriber.class.getSimpleName());
- final Method[] declaredMethods = beanClass.getDeclaredMethods();
- for (final Method method : declaredMethods) {
- final Subscribe subscriber = method.getAnnotation(Subscribe.class);
- if (subscriber != null) {
- LOGGER.trace("Found method {} for bean {} with {} annotation", method.getName(),
- bean.getClass().getName(), Subscribe.class.getSimpleName());
- eventBus.register(bean);
- return bean;
- }
- }
- }
- if (eventSubscriber != null) {
- LOGGER.debug("Found bean {} with {} annotation but without any method with necessary {} annotation",
- bean.getClass().getName(), EventSubscriber.class.getSimpleName(), Subscribe.class.getSimpleName());
- }
- return bean;
- }
-
- /**
- * package private setter for testing purposes.
- *
- * @param eventBus
- * the event bus
- */
- void setEventBus(final EventBus eventBus) {
- this.eventBus = eventBus;
- }
-}
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/EventSubscriber.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/EventSubscriber.java
deleted file mode 100644
index dd2f84074..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/EventSubscriber.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks an class as an event subscriber to listen on event on the event bus
- * without explicit register this class to the event bus.
- *
- *
- * @EventSubscriber
- * public class MySubscriber {
- * @Subscribe
- * public void listen(MyEvent event) {
- * System.out.println("event received: " + event);
- * }
- * }
- *
- *
- *
- *
- *
- */
-@Target({ TYPE })
-@Retention(RUNTIME)
-public @interface EventSubscriber {
-
-}
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/AbstractDistributedEvent.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/AbstractDistributedEvent.java
deleted file mode 100644
index c467a746c..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/AbstractDistributedEvent.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus.event;
-
-/**
- * An abstract class of the {@link DistributedEvent} implementation which holds
- * all the necessary information of distributing events to other nodes.
- *
- *
- *
- *
- */
-public abstract class AbstractDistributedEvent implements DistributedEvent {
-
- private static final long serialVersionUID = 1L;
- private final long revision;
- private String originNodeId;
- private String nodeId;
- private final String tenant;
-
- /**
- *
- * @param revision
- * the revision of this event
- * @param tenant
- * the tenant for this event
- */
- protected AbstractDistributedEvent(final long revision, final String tenant) {
- this.revision = revision;
- this.tenant = tenant;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.hawkbit.server.eventbus.event.NodeAware#setOriginNodeId(java.
- * lang. String)
- */
- @Override
- public void setOriginNodeId(final String originNodeId) {
- this.originNodeId = originNodeId;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.hawkbit.server.eventbus.event.NodeAware#setNodeId(java.lang.
- * String)
- */
- @Override
- public void setNodeId(final String nodeId) {
- this.nodeId = nodeId;
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.hawkbit.server.eventbus.event.NodeAware#getOriginNodeId()
- */
- @Override
- public String getOriginNodeId() {
- return this.originNodeId;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.hawkbit.server.eventbus.event.NodeAware#getNodeId()
- */
- @Override
- public String getNodeId() {
- return this.nodeId;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.hawkbit.server.eventbus.event.Event#getRevision()
- */
- @Override
- public long getRevision() {
- return revision;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.hawkbit.server.eventbus.event.EntityEvent#getTenant()
- */
- @Override
- public String getTenant() {
- return tenant;
- }
-
-}
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/DefaultEvent.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/DefaultEvent.java
deleted file mode 100644
index 1874fc01f..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/DefaultEvent.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus.event;
-
-/**
- * Abstract event definition class which holds the necessary revsion and tenant
- * information which every event needs.
- *
- * @see AbstractDistributedEvent for events which should be distributed to other
- * cluster nodes
- */
-public class DefaultEvent implements Event {
-
- private final long revision;
- private final String tenant;
-
- /**
- * @param revision
- * the revision number of the event
- * @param tenant
- * the tenant of the event
- */
- protected DefaultEvent(final long revision, final String tenant) {
- this.revision = revision;
- this.tenant = tenant;
- }
-
- @Override
- public long getRevision() {
- return revision;
- }
-
- @Override
- public String getTenant() {
- return tenant;
- }
-
-}
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/DistributedEvent.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/DistributedEvent.java
deleted file mode 100644
index b529afa91..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/DistributedEvent.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus.event;
-
-import java.io.Serializable;
-
-/**
- * Marks an event to as an distributed event which will be distributed to other
- * nodes.
- *
- *
- *
- *
- */
-public interface DistributedEvent extends Event, NodeAware, Serializable {
-
-}
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/EntityEvent.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/EntityEvent.java
deleted file mode 100644
index 688b261e1..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/EntityEvent.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus.event;
-
-/**
- * An event interface which declares event types that an entity has been
- * changed. {@link EntityEvent}s should not implement {@link DistributedEvent}
- * due all {@link EntityEvent}s will be distributed to other nodes.
- *
- * Retrieving an {@link EntityEvent} on a different node the entity will be load
- * lazy.
- *
- *
- *
- *
- */
-public interface EntityEvent extends Event, NodeAware {
-
- /**
- * A typesafe way to retrieve the entity from the event, which might be
- * loaded lazy in case the event has been distributed from another node.
- *
- * @param entityClass
- * the class of the entity to retrieve
- * @return the entity might be lazy loaded. Might be {@code null} in case
- * the entity e.g. is queried lazy on a different node and has been
- * already deleted from the database
- * @throws ClassCastException
- * in case a wrong entity class is given for this event
- */
- E getEntity(Class entityClass);
-
- /**
- * An unsafe way to retrieve the entity from this event which might be
- * loaded lazy in case the event has been distributed from another node.
- *
- * @return the entity might be lazy loaded. Might be {@code null} in case
- * the entity e.g. is queried lazy on a different node and has been
- * already deleted from the database
- */
- Object getEntity();
-}
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/Event.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/Event.java
deleted file mode 100644
index 9cbf6ef12..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/Event.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus.event;
-
-/**
- * An event declaration which holds an revision for each event so consumers have
- * the chance to know if they might already retrieved an newer event.
- *
- *
- *
- *
- */
-public interface Event {
-
- /**
- * @return the revision of this event which should be increment or each new
- * event in case the event have a causalität. Might be {@code -1} in
- * case the events does not provide any revision.
- */
- long getRevision();
-
- /**
- * @return the tenant of the entity.
- */
- String getTenant();
-}
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/NodeAware.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/NodeAware.java
deleted file mode 100644
index 2d7532d07..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/eventbus/event/NodeAware.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus.event;
-
-/**
- * Interface to be implemented by events which are distributed to other nodes
- * where it's necessary to know which node sent an event and which nodes
- * retrieved the event from which node. Using the EventDistributor the
- * implementation only needs to contain the necessary node IDs, setting and
- * retrieving the node IDs is transparent by the EventDistributor so the event
- * distributor does not hang in an endless loop of distributing the events which
- * self posted.
- *
- *
- *
- *
- */
-public interface NodeAware {
-
- /**
- * @return the origin node ID in case the event has been forwarded to other
- * nodes or {@code null} if the event has not been forwarded to
- * other nodes
- */
- String getOriginNodeId();
-
- /**
- * @param originNodeId
- * the origin node ID where this event has been sent originally
- */
- void setOriginNodeId(String originNodeId);
-
- /**
- * @return the node ID which is processing this event locally, set by the
- * EventDistributor so he can determine if this event has been
- * received by another node and is processing on the current node.
- */
- String getNodeId();
-
- /**
- * @param nodeId
- * the ID of the node this event is processing.
- */
- void setNodeId(String nodeId);
-
-}
diff --git a/hawkbit-core/src/test/java/org/eclipse/hawkbit/cache/DefaultDownloadIdCacheTest.java b/hawkbit-core/src/test/java/org/eclipse/hawkbit/cache/DefaultDownloadIdCacheTest.java
new file mode 100644
index 000000000..fb1b6caa8
--- /dev/null
+++ b/hawkbit-core/src/test/java/org/eclipse/hawkbit/cache/DefaultDownloadIdCacheTest.java
@@ -0,0 +1,124 @@
+/**
+ * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.eclipse.hawkbit.cache;
+
+import static org.fest.assertions.Assertions.assertThat;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.support.SimpleValueWrapper;
+
+import ru.yandex.qatools.allure.annotations.Description;
+import ru.yandex.qatools.allure.annotations.Features;
+import ru.yandex.qatools.allure.annotations.Stories;
+
+@Features("Unit Tests - Cache")
+@Stories("Download ID Cache")
+@RunWith(MockitoJUnitRunner.class)
+public class DefaultDownloadIdCacheTest {
+
+ @Mock
+ private CacheManager cacheManagerMock;
+
+ @Mock
+ private TenancyCacheManager tenancyCacheManagerMock;
+
+ @Mock
+ private Cache cacheMock;
+
+ @Captor
+ private ArgumentCaptor cacheManagerKeyCaptor;
+
+ @Captor
+ private ArgumentCaptor cacheManagerValueCaptor;
+
+ private DefaultDownloadIdCache underTest;
+
+ private final String knownKey = "12345";
+
+ @Before
+ public void before() {
+ underTest = new DefaultDownloadIdCache(cacheManagerMock);
+ when(cacheManagerMock.getCache(DefaultDownloadIdCache.DOWNLOAD_ID_CACHE)).thenReturn(cacheMock);
+ when(tenancyCacheManagerMock.getDirectCache(DefaultDownloadIdCache.DOWNLOAD_ID_CACHE)).thenReturn(cacheMock);
+ }
+
+ @Test
+ @Description("Verifies that putting key and value is delegated to the CacheManager implementation")
+ public void putKeyAndValueIsDelegatedToCacheManager() {
+ final DownloadArtifactCache value = new DownloadArtifactCache(DownloadType.BY_SHA1, knownKey);
+
+ underTest.put(knownKey, value);
+
+ verify(cacheMock).put(cacheManagerKeyCaptor.capture(), cacheManagerValueCaptor.capture());
+
+ assertThat(cacheManagerKeyCaptor.getValue()).isEqualTo(knownKey);
+ assertThat(cacheManagerValueCaptor.getValue()).isEqualTo(value);
+ }
+
+ @Test
+ @Description("Verifies that evicting a key is delegated to the CacheManager implementation")
+ public void evictKeyIsDelegatedToCacheManager() {
+
+ underTest.evict(knownKey);
+
+ verify(cacheMock).evict(cacheManagerKeyCaptor.capture());
+
+ assertThat(cacheManagerKeyCaptor.getValue()).isEqualTo(knownKey);
+ }
+
+ @Test
+ @Description("Verifies that retrieving a value for a specific key is delegated to the CacheManager implementation")
+ public void getValueReturnsTheAssociatedValueForKey() {
+ final String knownKey = "12345";
+ final DownloadArtifactCache knownValue = new DownloadArtifactCache(DownloadType.BY_SHA1, knownKey);
+
+ when(cacheMock.get(knownKey)).thenReturn(new SimpleValueWrapper(knownValue));
+
+ final DownloadArtifactCache downloadArtifactCache = underTest.get(knownKey);
+
+ assertThat(downloadArtifactCache).isEqualTo(knownValue);
+ }
+
+ @Test
+ @Description("Verifies that retrieving a null value for a specific key is delegated to the CacheManager implementation")
+ public void getValueReturnsNullIfNoKeyIsAssociated() {
+
+ when(cacheMock.get(knownKey)).thenReturn(new SimpleValueWrapper(null));
+
+ final DownloadArtifactCache downloadArtifactCache = underTest.get(knownKey);
+
+ assertThat(downloadArtifactCache).isNull();
+ }
+
+ @Test
+ @Description("Verifies that TenancyCacheManager is using direct cache because download-ids are global unique and don't need to run as tenant aware")
+ public void tenancyCacheManagerIsUsingDirectCache() {
+
+ underTest = new DefaultDownloadIdCache(tenancyCacheManagerMock);
+ final DownloadArtifactCache value = new DownloadArtifactCache(DownloadType.BY_SHA1, knownKey);
+
+ underTest.put(knownKey, value);
+
+ verify(cacheMock).put(cacheManagerKeyCaptor.capture(), cacheManagerValueCaptor.capture());
+
+ verify(tenancyCacheManagerMock).getDirectCache(DefaultDownloadIdCache.DOWNLOAD_ID_CACHE);
+ assertThat(cacheManagerKeyCaptor.getValue()).isEqualTo(knownKey);
+ assertThat(cacheManagerValueCaptor.getValue()).isEqualTo(value);
+ }
+}
diff --git a/hawkbit-core/src/test/java/org/eclipse/hawkbit/eventbus/EventBusSubscriberProcessorTest.java b/hawkbit-core/src/test/java/org/eclipse/hawkbit/eventbus/EventBusSubscriberProcessorTest.java
deleted file mode 100644
index de85af07b..000000000
--- a/hawkbit-core/src/test/java/org/eclipse/hawkbit/eventbus/EventBusSubscriberProcessorTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-package org.eclipse.hawkbit.eventbus;
-
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-import org.springframework.stereotype.Service;
-
-import com.google.common.eventbus.EventBus;
-import com.google.common.eventbus.Subscribe;
-
-import ru.yandex.qatools.allure.annotations.Features;
-import ru.yandex.qatools.allure.annotations.Stories;
-
-@Features("Unit Tests - Cluster Event Bus")
-@Stories("EventBus Subscriber Processor Test")
-@RunWith(MockitoJUnitRunner.class)
-// TODO: create description annotations
-public class EventBusSubscriberProcessorTest {
-
- @Mock
- private EventBus eventBusMock;
-
- private final EventBusSubscriberProcessor postProcessorUnderTest = new EventBusSubscriberProcessor();
-
- @Before
- public void before() {
- reset(eventBusMock);
- postProcessorUnderTest.setEventBus(eventBusMock);
- }
-
- @Test
- public void correctAnnotatedClassAndMethodIsRegistered() {
- final TestEventSubscriberClass testEventSubscriberClass = new TestEventSubscriberClass();
- postProcessorUnderTest.postProcessAfterInitialization(testEventSubscriberClass, "correctEventSubscriber");
- verify(eventBusMock, times(1)).register(testEventSubscriberClass);
- }
-
- @Test
- public void eventSubscriberWithoutMethodAnnotationIsNotRegistered() {
- final TestWrongEventSubscriberClass testEventSubscriberClass = new TestWrongEventSubscriberClass();
- postProcessorUnderTest.postProcessAfterInitialization(testEventSubscriberClass, "correctEventSubscriber");
- verify(eventBusMock, times(0)).register(testEventSubscriberClass);
- }
-
- @EventSubscriber
- @Service
- private class TestEventSubscriberClass {
- @Subscribe
- public void subscribe(final String s) {
-
- }
- }
-
- @EventSubscriber
- @Service
- private class TestWrongEventSubscriberClass {
- public void methodWithoutAnnotation(final String s) {
-
- }
- }
-}
diff --git a/hawkbit-ddi-api/pom.xml b/hawkbit-ddi-api/pom.xml
index 969f0d930..9dc4adf74 100644
--- a/hawkbit-ddi-api/pom.xml
+++ b/hawkbit-ddi-api/pom.xml
@@ -37,9 +37,5 @@
org.hibernate
hibernate-validator