Refactored BDD scpec and conding swap in TDD-style