@@ -0,0 +1,2857 @@
+package org.opendaylight.ovsdb.openstack.netvirt.impl;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.mockito.Matchers.anyString;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.InjectMocks;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0Aimport org.opendaylight.neutron.spi.INeutronPortCRUD;%0Aimport org.opendaylight.neutron.spi.NeutronPort;%0Aimport org.opendaylight.neutron.spi.NeutronSecurityGroup;%0Aimport org.opendaylight.ovsdb.lib.notation.Column;%0Aimport org.opendaylight.ovsdb.lib.schema.GenericTableSchema;%0Aimport org.opendaylight.ovsdb.openstack.netvirt.api.Constants;%0Aimport org.opendaylight.ovsdb.schema.openvswitch.Interface;%0A%0A/**%0A * Unit test for class SecurityServicesImpl%0A */%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class SecurityServicesImplTest %7B%0A%0A    @Mock private Interface intf;%0A    @Mock private NeutronPort neutronPort;%0A%0A    @InjectMocks private SecurityServicesImpl securityServicesImpl;%0A    @InjectMocks private INeutronPortCRUD neutronPortCache = mock(INeutronPortCRUD.class);%0A%0A    private List%3CNeutronSecurityGroup%3E securityGroups = new ArrayList%3CNeutronSecurityGroup%3E();%0A%0A    @Before%0A    public void setUp()%7B%0A        Map%3CString, String%3E externalIds =new HashMap%3CString, String%3E();%0A        externalIds.put(Constants.EXTERNAL_ID_INTERFACE_ID, %22mapValue%22);%0A        Column%3CGenericTableSchema, Map%3CString, String%3E%3E columnMock = mock(Column.class);%0A%0A        securityGroups.add(mock(NeutronSecurityGroup.class));%0A%0A        // configure interface%0A        when(intf.getExternalIdsColumn()).thenReturn(columnMock);%0A        when(columnMock.getData()).thenReturn(externalIds);%0A%0A        // configure neutronPort%0A        when(neutronPort.getSecurityGroups()).thenReturn(securityGroups);%0A        when(neutronPortCache.getPort(anyString())).thenReturn(neutronPort);%0A    %7D%0A%0A    /**%0A     * Test method %7B@link SecurityServicesImpl#isPortSecurityReady(Interface)%7D%0A     */%0A    @Test%0A    public void testIsPortSecurityReady()%7B%0A        // configure neutronPort%0A        when(neutronPort.getDeviceOwner()).thenReturn(%22deviceOwner%22);%0A%0A        //test%0A        assertTrue(%22Error, did not return expected boolean for isPortSecurityReady%22, securityServicesImpl.isPortSecurityReady(intf));%0A    %7D%0A%0A    /**%0A     * Test method %7B@link SecurityServicesImpl#getSecurityGroupInPort(Interface)%7D%0A     */%0A    @Test%0A    public void testSecurityGroupInPort()%7B%0A        // test%0A        assertEquals(%22Error, did not return the good neutronSecurityGroup of securityGroups%22, securityGroups.toArray()%5B0%5D, securityServicesImpl.getSecurityGroupInPort(intf));%0A    %7D%0A%7D%0A

Add JUnit testing for SecurityServicesImpl class.