@@ -0,0 +1,2132 @@
+/*%0A *  Copyright 2017 TWO SIGMA OPEN SOURCE, LLC%0A *%0A *  Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  you may not use this file except in compliance with the License.%0A *  You may obtain 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,%0A *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  See the License for the specific language governing permissions and%0A *  limitations under the License.%0A */%0A%0Apackage com.twosigma.beaker.jvm.classloader;%0A%0Aimport org.assertj.core.api.Assertions;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.io.InputStream;%0Aimport java.net.URL;%0Aimport java.util.Enumeration;%0A%0Apublic class DynamicClassLoaderSimpleTest %7B%0A%0A  private DynamicClassLoaderSimple loader;%0A  private static String className =%0A      %22com.twosigma.beaker.jvm.classloader.DynamicClassLoaderSimpleTest%22;%0A  private static String fileName =%0A      %22com/twosigma/beaker/jvm/classloader/DynamicClassLoaderSimpleTest.class%22;%0A%0A  @Before%0A  public void setUp() throws Exception %7B%0A    loader = new DynamicClassLoaderSimple(DynamicClassLoaderSimpleTest.class.getClassLoader());%0A  %7D%0A%0A  @Test%0A  public void loadClassWithNameParam_returnClass() throws Exception %7B%0A    //when%0A    Class clazz = loader.loadClass(className);%0A    //then%0A    Assertions.assertThat(clazz).isNotNull();%0A  %7D%0A%0A  @Test%0A  public void getResourceWithNameParam_returnURL() throws Exception %7B%0A    //when%0A    URL url = loader.getResource(fileName);%0A    //then%0A    Assertions.assertThat(url).isNotNull();%0A  %7D%0A%0A  @Test%0A  public void getResourceAsStreamWithNameParam_returnInputStream() throws Exception %7B%0A    //when%0A    InputStream is = loader.getResourceAsStream(fileName);%0A    //then%0A    Assertions.assertThat(is).isNotNull();%0A  %7D%0A%0A  @Test%0A  public void getResourcesWithNameParam_returnURLs() throws Exception %7B%0A    //when%0A    Enumeration%3CURL%3E urls = loader.getResources(fileName);%0A    //then%0A    Assertions.assertThat(urls).isNotNull();%0A  %7D%0A%0A%7D%0A

add test to DinamicClassLoaderSimple class (#203)