LDAP-300: Fix NPE for DefaultObjectDirectoryMapper in uber jar

This commit is contained in:
Rob Winch
2014-05-21 07:52:48 -05:00
parent ab88cab98e
commit a1541208b9
2 changed files with 7 additions and 3 deletions

View File

@@ -18,6 +18,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.matchers.JUnitMatchers;
import org.junit.runner.RunWith;
import org.mockito.internal.util.reflection.Whitebox;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.springframework.core.SpringVersion;
@@ -44,7 +45,10 @@ public class DefaultObjectDirectoryMapperTest {
spy(SpringVersion.class);
when(SpringVersion.getVersion()).thenReturn(null);
new DefaultObjectDirectoryMapper();
DefaultObjectDirectoryMapper mapper = new DefaultObjectDirectoryMapper();
// LDAP-300
assertNotNull(Whitebox.getInternalState(mapper,"converterManager"));
}
@Test