add unit tests for lang factory