Use Set.of()/Map.of() instead of mutable collections.
Change-Id: I230d7bb98f39e4c23d011a5fa946d7feb93a87d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
import static org.opendaylight.protocol.bgp.rib.spi.RIBNodeIdentifiers.TABLES_NID;
import static org.opendaylight.protocol.bgp.rib.spi.RIBNodeIdentifiers.UPTODATE_NID;
import static org.opendaylight.protocol.bgp.rib.spi.RIBNodeIdentifiers.TABLES_NID;
import static org.opendaylight.protocol.bgp.rib.spi.RIBNodeIdentifiers.UPTODATE_NID;
-import com.google.common.collect.Sets;
-import java.util.Collections;
import java.util.Map;
import java.util.Set;
import org.junit.Before;
import java.util.Map;
import java.util.Set;
import org.junit.Before;
public class AdjRibsInWriterTest {
private static final TablesKey K4 = new TablesKey(Ipv4AddressFamily.VALUE, UnicastSubsequentAddressFamily.VALUE);
public class AdjRibsInWriterTest {
private static final TablesKey K4 = new TablesKey(Ipv4AddressFamily.VALUE, UnicastSubsequentAddressFamily.VALUE);
- private static final Map<TablesKey, SendReceive> ADD_PATH_TABLE_MAPS
- = Collections.singletonMap(K4, SendReceive.Both);
- private final Set<TablesKey> tableTypes = Sets.newHashSet(K4);
+ private static final Map<TablesKey, SendReceive> ADD_PATH_TABLE_MAPS = Map.of(K4, SendReceive.Both);
+ private final Set<TablesKey> tableTypes = Set.of(K4);
private final String peerIp = "12.34.56.78";
@Mock
private DOMTransactionChain chain;
private final String peerIp = "12.34.56.78";
@Mock
private DOMTransactionChain chain;