@Test(expected = EtcdException.class) public void getWithResourceAccessException() throws EtcdException { server.expect(MockRestRequestMatchers.requestTo("http: .andExpect(MockRestRequestMatchers.method(HttpMethod.GET)) .andRespond(MockRestResponseCreators.withStatus(HttpStatus.NOT_FOUND) .contentType(MediaType.APPLICATION_JSON) .body(new ClassPathResource("EtcdClientTest_get.json"))); try { client.get("sample"); } finally { server.verify(); } }
public EtcdResponse get(String key) throws EtcdException { UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(KEYSPACE); builder.pathSegment(key); return execute(builder, HttpMethod.GET, null, EtcdResponse.class); }
EtcdClient implements InitializingBean, DisposableBean { public EtcdResponse get(String key) throws EtcdException { UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(KEYSPACE); builder.pathSegment(key); return execute(builder, HttpMethod.GET, null, EtcdResponse.class); } }
EtcdClient implements InitializingBean, DisposableBean { public EtcdResponse get(String key) throws EtcdException { UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(KEYSPACE); builder.pathSegment(key); return execute(builder, HttpMethod.GET, null, EtcdResponse.class); } EtcdClient();  EtcdClient(String location);  EtcdClient(String[] locations); }
EtcdClient implements InitializingBean, DisposableBean { public EtcdResponse get(String key) throws EtcdException { UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(KEYSPACE); builder.pathSegment(key); return execute(builder, HttpMethod.GET, null, EtcdResponse.class); } EtcdClient();  EtcdClient(String location);  EtcdClient(String[] locations); boolean isLocationUpdaterEnabled(); void setLocationUpdaterEnabled(boolean value); void setLocations(String[] value); String[] getLocations(); EtcdResponse get(String key); EtcdResponse get(String key, boolean recursive); EtcdResponse put(final String key, final String value); EtcdResponse put(String key, String value, int ttl); EtcdResponse delete(final String key); EtcdResponse create(final String key, final String value); EtcdResponse compareAndSwap(final String key, final String value, boolean prevExist); EtcdResponse compareAndSwap(final String key, final String value, int ttl, boolean prevExist); EtcdResponse compareAndSwap(String key, String value, int prevIndex); EtcdResponse compareAndSwap(String key, String value, int ttl, int prevIndex); EtcdResponse compareAndSwap(String key, String value, String prevValue); EtcdResponse compareAndSwap(String key, String value, int ttl, String prevValue); EtcdResponse compareAndDelete(final String key, int prevIndex); EtcdResponse compareAndDelete(final String key, String prevValue); EtcdResponse putDir(final String key); EtcdResponse putDir(String key, int ttl); EtcdResponse deleteDir(String key); EtcdResponse deleteDir(String key, boolean recursive); EtcdMemberResponse listMembers(); @Override void afterPropertiesSet(); @Override void destroy(); }
EtcdClient implements InitializingBean, DisposableBean { public EtcdResponse get(String key) throws EtcdException { UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(KEYSPACE); builder.pathSegment(key); return execute(builder, HttpMethod.GET, null, EtcdResponse.class); } EtcdClient();  EtcdClient(String location);  EtcdClient(String[] locations); boolean isLocationUpdaterEnabled(); void setLocationUpdaterEnabled(boolean value); void setLocations(String[] value); String[] getLocations(); EtcdResponse get(String key); EtcdResponse get(String key, boolean recursive); EtcdResponse put(final String key, final String value); EtcdResponse put(String key, String value, int ttl); EtcdResponse delete(final String key); EtcdResponse create(final String key, final String value); EtcdResponse compareAndSwap(final String key, final String value, boolean prevExist); EtcdResponse compareAndSwap(final String key, final String value, int ttl, boolean prevExist); EtcdResponse compareAndSwap(String key, String value, int prevIndex); EtcdResponse compareAndSwap(String key, String value, int ttl, int prevIndex); EtcdResponse compareAndSwap(String key, String value, String prevValue); EtcdResponse compareAndSwap(String key, String value, int ttl, String prevValue); EtcdResponse compareAndDelete(final String key, int prevIndex); EtcdResponse compareAndDelete(final String key, String prevValue); EtcdResponse putDir(final String key); EtcdResponse putDir(String key, int ttl); EtcdResponse deleteDir(String key); EtcdResponse deleteDir(String key, boolean recursive); EtcdMemberResponse listMembers(); @Override void afterPropertiesSet(); @Override void destroy();  }