Updated for v1_0 of swu API and added test cases.