@Override
    public void subscribePreCommit(String portId, Type eventType, String className) {
        store.computeIfAbsent(portId, s -> new HashMap<>());

        store.compute(portId, (k, v) -> {

            if (className == null || className.isEmpty()) {
                return null;
            }

            Objects.requireNonNull(v).computeIfAbsent(eventType, s -> new HashSet<>());


            Objects.requireNonNull(v).compute(eventType, (i, j) -> {
                Objects.requireNonNull(j).add(className);
                return j;
            });

            return v;
        });
    }
@Test
    public void testSubscribePreCommit() {

        sampleSubscribe();

        assertEquals(1, target.subscriberCountByEventType(PORT_ID_1, OPENSTACK_PORT_PRE_REMOVE));
        assertEquals(2, target.subscriberCountByEventType(PORT_ID_2, OPENSTACK_PORT_PRE_REMOVE));

        assertEquals(0, target.subscriberCountByEventType(PORT_ID_1, OPENSTACK_PORT_PRE_UPDATE));
        assertEquals(1, target.subscriberCountByEventType(PORT_ID_2, OPENSTACK_PORT_PRE_UPDATE));

        assertEquals(1, target.subscriberCount(PORT_ID_1));
        assertEquals(3, target.subscriberCount(PORT_ID_2));
    }