@@ -0,0 +1,2355 @@
+/*%0A * Copyright 2015 Open Networking Laboratory%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.onosproject.vtnrsc.virtualport;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.hamcrest.Matchers.notNullValue;%0Aimport static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;%0A%0Aimport org.junit.Test;%0Aimport org.onlab.packet.IpAddress;%0Aimport org.onosproject.vtnrsc.FixedIp;%0Aimport org.onosproject.vtnrsc.SubnetId;%0A%0Aimport com.google.common.testing.EqualsTester;%0A%0A/**%0A * Unit tests for FixedIp class.%0A */%0Apublic class FixedIpTest %7B%0A%0A    final SubnetId subnetId1 = SubnetId.subnetId(%22lef11-95w-4er-9c9c%22);%0A    final SubnetId subnetId2 = SubnetId.subnetId(%22lefaa-95w-4er-9c9c%22);%0A    final IpAddress ip1 = IpAddress.valueOf(%22192.168.0.1%22);%0A    final IpAddress ip2 = IpAddress.valueOf(%22192.168.1.1%22);%0A%0A    /**%0A     * Checks that the FixedIp class is immutable.%0A     */%0A    @Test%0A    public void testImmutability() %7B%0A        assertThatClassIsImmutable(FixedIp.class);%0A    %7D%0A%0A    /**%0A     * Checks the operation of equals().%0A     */%0A    @Test%0A    public void testEquals() %7B%0A        FixedIp fixedIp1 = FixedIp.fixedIp(subnetId1, ip1);%0A        FixedIp fixedIp2 = FixedIp.fixedIp(subnetId1, ip1);%0A        FixedIp fixedIp3 = FixedIp.fixedIp(subnetId2, ip2);%0A        new EqualsTester().addEqualityGroup(fixedIp1, fixedIp2)%0A                .addEqualityGroup(fixedIp3).testEquals();%0A    %7D%0A%0A    /**%0A     * Checks the construction of a FixedIp object.%0A     */%0A    @Test%0A    public void testConstruction() %7B%0A        FixedIp fixedIp = FixedIp.fixedIp(subnetId1, ip1);%0A        assertThat(ip1, is(notNullValue()));%0A        assertThat(ip1, is(fixedIp.ip()));%0A        assertThat(subnetId1, is(notNullValue()));%0A        assertThat(subnetId1, is(fixedIp.subnetId()));%0A    %7D%0A%7D%0A

Add the junit test code of FixedIp