@Test(expected = HttpClientErrorException.class) @WireMockTest(stubPath = "mappings/note-badrequest-example") public void should_2_use_different_wiremock_stub() { noteService.getNote("xy"); }
public Note getNote(String id) { URI resolvedUri = configuration.baseUri().resolve("/notes/").resolve(id); log.info("Retrieving note from {}", resolvedUri); return restTemplate.getForObject(resolvedUri, Note.class); }
NoteService { public Note getNote(String id) { URI resolvedUri = configuration.baseUri().resolve("/notes/").resolve(id); log.info("Retrieving note from {}", resolvedUri); return restTemplate.getForObject(resolvedUri, Note.class); } }
NoteService { public Note getNote(String id) { URI resolvedUri = configuration.baseUri().resolve("/notes/").resolve(id); log.info("Retrieving note from {}", resolvedUri); return restTemplate.getForObject(resolvedUri, Note.class); } @Autowired  NoteService(NoteServiceConfiguration configuration); }
NoteService { public Note getNote(String id) { URI resolvedUri = configuration.baseUri().resolve("/notes/").resolve(id); log.info("Retrieving note from {}", resolvedUri); return restTemplate.getForObject(resolvedUri, Note.class); } @Autowired  NoteService(NoteServiceConfiguration configuration); Note getNote(String id); }
NoteService { public Note getNote(String id) { URI resolvedUri = configuration.baseUri().resolve("/notes/").resolve(id); log.info("Retrieving note from {}", resolvedUri); return restTemplate.getForObject(resolvedUri, Note.class); } @Autowired  NoteService(NoteServiceConfiguration configuration); Note getNote(String id);  }