@@ -0,0 +1,2367 @@
+/**%0A * Licensed to Jasig under one or more contributor license%0A * agreements. See the NOTICE file distributed with this work%0A * for additional information regarding copyright ownership.%0A * Jasig licenses this file to you under the Apache License,%0A * Version 2.0 (the %22License%22); you may not use this file%0A * except in compliance with the License. You may obtain a%0A * 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,%0A * software distributed under the License is distributed on%0A * an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied. See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Apackage org.jasig.portal.portlets.portletadmin;%0A%0Aimport org.jasig.portal.portlet.dao.jpa.PortletTypeImpl;%0Aimport org.jasig.portal.portlet.om.IPortletType;%0Aimport org.jasig.portal.portletpublishing.xml.PortletPublishingDefinition;%0Aimport org.junit.Test;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport static org.junit.Assert.assertNull;%0A%0A/**%0A * Unit test for PortletAdministrationHelper.%0A */%0Apublic class PortletAdministrationHelperTest %7B%0A%0A    /**%0A     * When there are multiple available portlet types, the method%0A     * updateFormForSinglePortletType(...)%0A     * is a no-op returning null.%0A     *%0A     * This test case verifies that the method returns null in this case.%0A     */%0A    @Test%0A    public void updateFormForSinglePortletTypeNoOpWhenMultiplePortletTypes() %7B%0A%0A        PortletAdministrationHelper helper = new PortletAdministrationHelper();%0A%0A        Map%3CIPortletType, PortletPublishingDefinition%3E portletDefinitions = new HashMap%3C%3E();%0A%0A        IPortletType someType = new PortletTypeImpl(%22someType%22, %22someUri%22);%0A        IPortletType someOtherType = new PortletTypeImpl(%22someOtherType%22, %22someOtherUri%22);%0A%0A        PortletPublishingDefinition someDefinition = new PortletPublishingDefinition();%0A        PortletPublishingDefinition someOtherDefinition = new PortletPublishingDefinition();%0A%0A        portletDefinitions.put(someType, someDefinition);%0A        portletDefinitions.put(someOtherType, someOtherDefinition);%0A%0A        PortletDefinitionForm form = new PortletDefinitionForm();%0A%0A        assertNull( helper.updateFormForSinglePortletType(portletDefinitions, form) );%0A%0A    %7D%0A%7D%0A

Add trivial unit test.