@Override
    public void createNode(KubevirtNode node) {
        checkNotNull(node, ERR_NULL_NODE);

        KubevirtNode intNode;
        KubevirtNode tunNode;

        if (node.intgBridge() == null) {
            String deviceIdStr = genDpidFromName(INTEGRATION_BRIDGE + "-" + node.hostname());
            checkNotNull(deviceIdStr, ERR_NULL_DEVICE_ID);
            intNode = node.updateIntgBridge(DeviceId.deviceId(deviceIdStr));
            checkArgument(!hasIntgBridge(intNode.intgBridge(), intNode.hostname()),
                    NOT_DUPLICATED_MSG, intNode.intgBridge());
        } else {
            intNode = node;
            checkArgument(!hasIntgBridge(intNode.intgBridge(), intNode.hostname()),
                    NOT_DUPLICATED_MSG, intNode.intgBridge());
        }

        if (node.tunBridge() == null) {
            String deviceIdStr = genDpidFromName(TUNNEL_BRIDGE + "-" + node.hostname());
            checkNotNull(deviceIdStr, ERR_NULL_DEVICE_ID);
            tunNode = intNode.updateTunBridge(DeviceId.deviceId(deviceIdStr));
            checkArgument(!hasTunBridge(tunNode.tunBridge(), tunNode.hostname()),
                    NOT_DUPLICATED_MSG, tunNode.tunBridge());
        } else {
            tunNode = intNode;
            checkArgument(!hasTunBridge(tunNode.tunBridge(), tunNode.hostname()),
                    NOT_DUPLICATED_MSG, tunNode.tunBridge());
        }

        nodeStore.createNode(tunNode);

        log.info(String.format(MSG_NODE, tunNode.hostname(), MSG_CREATED));
    }
@Test(expected = NullPointerException.class)
    public void testCreateNullNode() {
        target.createNode(null);
    }