1
2
3
4
5
6
7 package org.mule.util;
8
9 import org.mule.tck.junit4.AbstractMuleTestCase;
10
11 import java.io.InputStream;
12
13 import org.junit.Test;
14
15 import static org.junit.Assert.assertNotNull;
16 import static org.junit.Assert.assertNull;
17
18 public class IOUtilsTestCase extends AbstractMuleTestCase
19 {
20
21 @Test
22 public void testLoadingResourcesAsStream() throws Exception
23 {
24 InputStream is = IOUtils.getResourceAsStream("log4j.properties", getClass(), false, false);
25 assertNotNull(is);
26
27 is = IOUtils.getResourceAsStream("does-not-exist.properties", getClass(), false, false);
28 assertNull(is);
29 }
30
31 }