elvyssoares

JerseyClientBuilderTest - Refactored

May 19th, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. @Rule
  2. public ExpectedException thrown = ExpectedException.none();
  3.  
  4. @Test
  5. public void throwsAnExceptionWithoutAnEnvironmentAndOnlyAThreadPool() {
  6.     thrown.expect(IllegalStateException.class);
  7.     thrown.expectMessage("Must have either an environment or both an executor service and an object mapper");
  8.     builder.using(executorService).build("test");
  9. }
Advertisement
Add Comment
Please, Sign In to add comment