Feature/refactoring testing and add feature spec

Any suggestion, Thanks.