on 2018 Dec 11 1:45 PM
ExportEventSender fails with NPE in case of anonymous class instances:
import static org.assertj.core.api.Assertions.assertThat;
import javax.annotation.Resource;
import org.junit.Test;
import de.hybris.bootstrap.annotations.IntegrationTest;
import de.hybris.platform.apiregistryservices.event.impl.ExportEventSender;
import de.hybris.platform.servicelayer.ServicelayerBaseTest;
import de.hybris.platform.servicelayer.event.events.AbstractEvent;
@IntegrationTest
public class ExportEventSenderTest extends ServicelayerBaseTest {
@Resource
private ExportEventSender exportEventSender;
@Test
public void test() {
AbstractEvent anonymousInstance = new AbstractEvent() {};
exportEventSender.sendEvent(anonymousInstance);
assertThat(true).isTrue();
}
}
Request clarification before answering.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.