[BUGFIX] mock external class in unit test