public void testLogout() throws Exception { api.logout(MockSubjectWorker.DEVICE_CODE); try { api.logout("wrong device code"); Assert.fail(); } catch (ClientResponseFailure e) { Assert.assertEquals(e.getMessage(), "Error status 400 Bad Request returned"); } }