@@ -0,0 +1,2079 @@
+/*%0A * Copyright 2012 Splunk, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22): you may%0A * not use this file except in compliance with the License. You may obtain%0A * 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, WITHOUT%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A * License for the specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Apackage com.splunk;%0A%0Aimport java.util.Map;%0A%0Aimport org.junit.Test;%0A%0Apublic class EntityTest extends SDKTestCase %7B%0A    private static final String QUERY = %22search index=_internal %7C head 10%22;%0A    %0A    private static final String KEY = %22isSavedSearch%22;%0A    private static final String VALUE = %220%22;%0A%0A    @Test%0A    public void testMapOverrides() %7B%0A        Entity entity = service.getJobs().create(QUERY);%0A        %0A        assertFalse(entity.isEmpty());%0A        assertEquals(VALUE, entity.get(KEY));%0A        assertTrue(entity.containsKey(KEY));%0A        assertTrue(entity.containsValue(VALUE));%0A        assertTrue(entity.keySet().contains(KEY));%0A        assertTrue(entity.values().contains(VALUE));%0A        for (Map.Entry%3CString, Object%3E e : entity.entrySet()) %7B%0A            assertTrue(entity.containsKey(e.getKey()));%0A            assertTrue(entity.containsValue(e.getValue()));%0A        %7D%0A        %0A        try %7B%0A            entity.putAll(null);%0A            fail(%22Expected UnsupportedOperationException.%22);%0A        %7D catch (UnsupportedOperationException e) %7B%0A            // Good%0A        %7D%0A        %0A        try %7B%0A            entity.clear();%0A            fail(%22Expected UnsupportedOperationException.%22);%0A        %7D catch (UnsupportedOperationException e) %7B%0A            // Good%0A        %7D%0A        %0A        try %7B%0A            entity.remove(null);%0A            fail(%22Expected UnsupportedOperationException.%22);%0A        %7D catch (UnsupportedOperationException e) %7B%0A            // Good%0A        %7D%0A    %7D%0A%7D%0A

Test map overrides on Entity.