add testcase for switchable backends

Add test cases which define the expected behaviour for switchable
backends.
add switchable backend support
Merge pull request #80 from rjw57/switchable-backends

implement switchable backends