@@ -0,0 +1,1431 @@
+/*%0A * Copyright (c) 2015 Cisco Systems, 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 */%0Apackage org.opendaylight.protocol.bgp.rib.impl;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Test;%0A%0Apublic class OffsetMapTests %7B%0A%0A    private final String LOCAL_ADDRESS = %22127.0.0.1%22;%0A    private final int LOCAL_ADDRESS_DECIMAL = 0x7f000001;%0A    private final Integer%5B%5D TESTED_VALUES = %7B 1, 2, 3, 4, 5, 6, 7 %7D;%0A    private final int EXPECTED_ROUTER_OFFSET = 0;%0A    private final int EXPECTED_VALUE = 1;%0A    private final int CHANGED_VALUE = 111;%0A%0A    @Test%0A    public void testAllMethods() %7B%0A        final OffsetMap offsetMap = OffsetMap.EMPTY.with(RouterIds.routerIdForAddress(LOCAL_ADDRESS));%0A        assertEquals(EXPECTED_ROUTER_OFFSET, offsetMap.offsetOf(RouterIds.routerIdForAddress(LOCAL_ADDRESS)));%0A        assertEquals(LOCAL_ADDRESS_DECIMAL, offsetMap.getRouterId(EXPECTED_ROUTER_OFFSET).intValue());%0A%0A        assertEquals(EXPECTED_VALUE, (int)offsetMap.getValue(TESTED_VALUES, EXPECTED_ROUTER_OFFSET));%0A        offsetMap.setValue(TESTED_VALUES, EXPECTED_ROUTER_OFFSET, CHANGED_VALUE);%0A        assertEquals(CHANGED_VALUE, (int)offsetMap.getValue(TESTED_VALUES, EXPECTED_ROUTER_OFFSET));%0A    %7D%0A%7D%0A

Test for OffsetMap