@Test public void testCreatePortPair() { portPairMgr.storageService = storageService; injectEventDispatcher(portPairMgr, new TestEventDispatcher()); portPairMgr.activate(); portPair = portPairBuilder.setId(portPairId).setTenantId(tenantId).setName(name) .setDescription(description).setIngress(ingress).setEgress(egress).build(); assertThat(portPairMgr.createPortPair(portPair), is(true)); }
@Override public boolean createPortPair(PortPair portPair) { checkNotNull(portPair, PORT_PAIR_NULL); portPairStore.put(portPair.portPairId(), portPair); if (!portPairStore.containsKey(portPair.portPairId())) { log.debug("The portPair is created failed which identifier was {}", portPair.portPairId().toString()); return false; } return true; }
PortPairManager extends AbstractListenerManager<PortPairEvent, PortPairListener> implements
        PortPairService { @Override public boolean createPortPair(PortPair portPair) { checkNotNull(portPair, PORT_PAIR_NULL); portPairStore.put(portPair.portPairId(), portPair); if (!portPairStore.containsKey(portPair.portPairId())) { log.debug("The portPair is created failed which identifier was {}", portPair.portPairId().toString()); return false; } return true; } }
PortPairManager extends AbstractListenerManager<PortPairEvent, PortPairListener> implements
        PortPairService { @Override public boolean createPortPair(PortPair portPair) { checkNotNull(portPair, PORT_PAIR_NULL); portPairStore.put(portPair.portPairId(), portPair); if (!portPairStore.containsKey(portPair.portPairId())) { log.debug("The portPair is created failed which identifier was {}", portPair.portPairId().toString()); return false; } return true; }  }
PortPairManager extends AbstractListenerManager<PortPairEvent, PortPairListener> implements
        PortPairService { @Override public boolean createPortPair(PortPair portPair) { checkNotNull(portPair, PORT_PAIR_NULL); portPairStore.put(portPair.portPairId(), portPair); if (!portPairStore.containsKey(portPair.portPairId())) { log.debug("The portPair is created failed which identifier was {}", portPair.portPairId().toString()); return false; } return true; }  @Activate void activate(); @Deactivate void deactivate(); @Override boolean exists(PortPairId portPairId); @Override int getPortPairCount(); @Override Iterable<PortPair> getPortPairs(); @Override PortPair getPortPair(PortPairId portPairId); @Override boolean createPortPair(PortPair portPair); @Override boolean updatePortPair(PortPair portPair); @Override boolean removePortPair(PortPairId portPairId); }
PortPairManager extends AbstractListenerManager<PortPairEvent, PortPairListener> implements
        PortPairService { @Override public boolean createPortPair(PortPair portPair) { checkNotNull(portPair, PORT_PAIR_NULL); portPairStore.put(portPair.portPairId(), portPair); if (!portPairStore.containsKey(portPair.portPairId())) { log.debug("The portPair is created failed which identifier was {}", portPair.portPairId().toString()); return false; } return true; }  @Activate void activate(); @Deactivate void deactivate(); @Override boolean exists(PortPairId portPairId); @Override int getPortPairCount(); @Override Iterable<PortPair> getPortPairs(); @Override PortPair getPortPair(PortPairId portPairId); @Override boolean createPortPair(PortPair portPair); @Override boolean updatePortPair(PortPair portPair); @Override boolean removePortPair(PortPairId portPairId);  }