@Test
 public void transfer_in_authentication_error() {
   try {
     transferIn(AS50___far_last_of_nonripe_block, "nonExistingUser.wrongPassword,dummy topic");
   } catch (NotAuthorizedException exc) {
     assertThat(
         exc.getResponse().readEntity(String.class), containsString("FAILED_AUTHENTICATION"));
   }
 }
Ejemplo n.º 2
0
 @Test
 public void testMe() throws Exception {
   ResteasyClient client = new ResteasyClient();
   MyTest proxy = client.target(TestPortProvider.generateURL("")).proxy(MyTest.class);
   try {
     proxy.postIt("hello");
     Assert.fail();
   } catch (NotAuthorizedException e) {
     Assert.assertEquals(401, e.getResponse().getStatus());
   }
   client.close();
 }