Fixed incorrect unit test and corresponding bug in the DN extraction code.