test ref: http://qiita.com/snaka/items/ba93160aa3c08b9053bc