/*
 * Copyright (C) 2011 Herve Quiroz
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 * 
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 */
package org.trancecode.collection;

import com.google.common.collect.ImmutableMap;

import java.util.Map;

import org.testng.Assert;
import org.testng.annotations.Test;
import org.trancecode.AbstractTest;

/**
 * Tests for {@link TcMaps}.
 * 
 * @author Herve Quiroz
 */
public final class TcMapsTest extends AbstractTest
{
    @Test
    public void merge()
    {
        final Map<Integer, String> map1 = ImmutableMap.of(1, "1", 2, "2", 3, "3");
        final Map<Integer, String> map2 = ImmutableMap.of(2, "2", 3, "3", 4, "4");
        Assert.assertEquals(TcMaps.merge(map1, map2), ImmutableMap.of(1, "1", 2, "2", 3, "3", 4, "4"));
    }
}

@@ -1413,11 +1413,357 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void copyAndPut()%0A    %7B%0A        final Map%3CInteger, String%3E map = ImmutableMap.of(1, %221%22, 2, %222%22, 3, %223%22);%0A        Assert.assertEquals(TcMaps.copyAndPut(map, 4, %224%22), ImmutableMap.of(1, %221%22, 2, %222%22, 3, %223%22, 4, %224%22));%0A        Assert.assertEquals(TcMaps.copyAndPut(map, 3, %224%22), ImmutableMap.of(1, %221%22, 2, %222%22, 3, %224%22));%0A    %7D
 %0A%7D%0A

Add tests for TcMaps