fe81a4626a04faa0426925ab2466085442ca8d73
[sdc.git] /
1 package org.openecomp.sdc.logging;
2
3 import org.openecomp.sdc.logging.api.LoggerFactory;
4 import org.testng.annotations.Test;
5
6 import java.lang.reflect.Field;
7
8 import static org.testng.Assert.assertEquals;
9
10 /**
11  * @author evitaliy
12  * @since 12/09/2016.
13  */
14 public class LoggerFactoryTest {
15
16   @Test
17   public void testCreate() throws Exception {
18     // test that the service loader loads the right implementation
19     LoggerFactory.getLogger(LoggerFactoryTest.class);
20     Field factory = LoggerFactory.class.getDeclaredField("SERVICE");
21     factory.setAccessible(true);
22     Object implementation = factory.get(null);
23     assertEquals(SLF4JLoggerCreationService.class, implementation.getClass());
24   }
25 }