Support testing with static library

Closed #9