@@ -0,0 +1,2302 @@
+/*%0A * Copyright (c) 2017 Inocybe, Inc. and others. All rights reserved.%0A *%0A * This program and the accompanying materials are made available under the%0A * terms of the Eclipse Public License v1.0 which accompanies this distribution,%0A * and is available at http://www.eclipse.org/legal/epl-v10.html%0A */%0A%0Apackage org.opendaylight.neutron.hostconfig.vpp;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Apublic class SocketInfoTest %7B%0A%0A    private static final String SOCKET_PATH = %22/tmp%22;%0A    private static final String SOCKET_PREFIX = %22socket_%22;%0A    private static final String VHOSTUSER_MODE = %22server%22;%0A%0A    // For equal test%0A    private static final String SOCKET_PATH_BIS = %22/opt%22;%0A    private static final String SOCKET_PREFIX_BIS = %22socket_bis_%22;%0A    private static final String VHOSTUSER_MODE_BIS = %22server_bis%22;%0A    private SocketInfo socketInfo;%0A%0A    @Before%0A    public void init() %7B%0A        socketInfo = new SocketInfo(SOCKET_PATH, SOCKET_PREFIX, VHOSTUSER_MODE);%0A    %7D%0A%0A    @Test%0A    public void getSocketPathTest() %7B%0A        Assert.assertEquals(socketInfo.getSocketPath(), SOCKET_PATH);%0A    %7D%0A%0A    @Test%0A    public void getSocketPrefixTest() %7B%0A        Assert.assertEquals(socketInfo.getSocketPrefix(), SOCKET_PREFIX);%0A    %7D%0A%0A    @Test%0A    public void getVhostuserModeTest() %7B%0A        Assert.assertEquals(socketInfo.getVhostuserMode(), VHOSTUSER_MODE);%0A    %7D%0A%0A    @Test%0A    public void getVhostUserSocketTest() %7B%0A        final String expectedResult = %22/tmpsocket_$PORT_ID%22;%0A        Assert.assertEquals(socketInfo.getVhostUserSocket(), expectedResult);%0A    %7D%0A%0A    @Test%0A    public void hashCodeTest() %7B%0A        final int expectedResult = 1774869086;%0A        Assert.assertEquals(socketInfo.hashCode(), expectedResult);%0A    %7D%0A%0A    @Test%0A    public void equalTest() %7B%0A        Assert.assertTrue(socketInfo.equals(socketInfo));%0A        Assert.assertFalse(socketInfo.equals(null));%0A        Assert.assertFalse(socketInfo.equals(0));%0A        Assert.assertFalse(socketInfo.equals(new SocketInfo(SOCKET_PATH_BIS, SOCKET_PREFIX, VHOSTUSER_MODE)));%0A        Assert.assertFalse(socketInfo.equals(new SocketInfo(SOCKET_PATH, SOCKET_PREFIX_BIS, VHOSTUSER_MODE)));%0A        Assert.assertFalse(socketInfo.equals(new SocketInfo(SOCKET_PATH, SOCKET_PATH, VHOSTUSER_MODE_BIS)));%0A    %7D%0A%0A%0A%0A%7D%0A

Add unit test for SocketInfo