Index: C:/harmony/classlib1.5/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/RMIClassLoaderTest.java =================================================================== --- C:/harmony/classlib1.5/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/RMIClassLoaderTest.java (revision 0) +++ C:/harmony/classlib1.5/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/RMIClassLoaderTest.java (revision 0) @@ -0,0 +1,51 @@ +/* + * Copyright 2006 The Apache Software Foundation or its licensors, as applicable + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.harmony.rmi.server; + +import java.rmi.server.RMIClassLoader; +import java.net.MalformedURLException; + +import junit.framework.TestCase; + +public class RMIClassLoaderTest extends TestCase { + + /** + * Test for java.rmi.server.RMIClassLoader.loadProxyClass(String, String[], ClassLoader) + */ + public void test_loadProxyClass() throws Exception { + //Regression for HARMONY-1133 + try { + RMIClassLoader.loadProxyClass("zzz", new String[] {}, null); + fail("MalformedURLException expected"); + } catch (MalformedURLException e) { + //expected + } + } + + /** + * Test for java.rmi.server.RMIClassLoader.loadClass(String, String) + */ + public void test_loadClass() throws Exception { + //Regression for HARMONY-1133 + try { + RMIClassLoader.loadClass("zzz", "a123"); + fail("MalformedURLException expected"); + } catch (MalformedURLException e) { + //expected + } + } +}