Added unittest and demo program.