@Override
    public void setEncapsulationType(VplsData vplsData, EncapsulationType encapsulationType) {
        requireNonNull(vplsData);
        requireNonNull(encapsulationType);
        VplsData newData = VplsData.of(vplsData);
        if (newData.encapsulationType().equals(encapsulationType)) {
            // Encap type not changed.
            return;
        }
        newData.encapsulationType(encapsulationType);
        updateVplsStatus(newData, VplsData.VplsState.UPDATING);
    }
@Test
    public void testSetEncapsulationType() {
        VplsData vplsData = vplsManager.createVpls(VPLS1, NONE);
        vplsManager.setEncapsulationType(vplsData, EncapsulationType.VLAN);
        vplsData = vplsStore.getVpls(VPLS1);
        assertNotNull(vplsData);
        assertEquals(vplsData.state(), UPDATING);
        assertEquals(vplsData.encapsulationType(), EncapsulationType.VLAN);
    }