@SuppressWarnings({ "unchecked", "rawtypes" }) @Test public void testGetByIdWithValidId() throws HttpException { RestClient mockClient = EasyMock.createMock(RestClient.class); DawgHouseClient client = new DawgHouseClient(); client.setClient(mockClient); Map map = new HashMap(); EasyMock.expect(mockClient.get((String) EasyMock.anyObject(),(Class<Map>)EasyMock.anyObject())).andReturn(map); EasyMock.replay(mockClient); String id = "770000004A12"; Assert.assertNotNull(client.getById(id )); }
@Override public MetaStb getById(String id) { return httpget("/devices/id/"+id); }
DawgHouseClient extends DawgClient implements IDawgHouseClient<MetaStb> { @Override public MetaStb getById(String id) { return httpget("/devices/id/"+id); } }
DawgHouseClient extends DawgClient implements IDawgHouseClient<MetaStb> { @Override public MetaStb getById(String id) { return httpget("/devices/id/"+id); } DawgHouseClient();  DawgHouseClient(String baseURL); }
DawgHouseClient extends DawgClient implements IDawgHouseClient<MetaStb> { @Override public MetaStb getById(String id) { return httpget("/devices/id/"+id); } DawgHouseClient();  DawgHouseClient(String baseURL); @Override MetaStb getById(String id); @Override void add(MetaStb stb); @Override void delete(String id); @Override Collection<MetaStb> getByIds(Collection<String> ids); @Override Collection<MetaStb> getByQuery(String query); @Override void deleteByIds(Collection<String> ids); @Override void delete(MetaStb stb); @Override void delete(Collection<MetaStb> stbs); @Override void add(Collection<MetaStb> stbs); @Override void update(MetaStb stb); @Override void update(Collection<String> id, Map<String, Object> data); @Override Collection<MetaStb> getAll(); DawgModel[] getDawgModels(String... modelNames); }
DawgHouseClient extends DawgClient implements IDawgHouseClient<MetaStb> { @Override public MetaStb getById(String id) { return httpget("/devices/id/"+id); } DawgHouseClient();  DawgHouseClient(String baseURL); @Override MetaStb getById(String id); @Override void add(MetaStb stb); @Override void delete(String id); @Override Collection<MetaStb> getByIds(Collection<String> ids); @Override Collection<MetaStb> getByQuery(String query); @Override void deleteByIds(Collection<String> ids); @Override void delete(MetaStb stb); @Override void delete(Collection<MetaStb> stbs); @Override void add(Collection<MetaStb> stbs); @Override void update(MetaStb stb); @Override void update(Collection<String> id, Map<String, Object> data); @Override Collection<MetaStb> getAll(); DawgModel[] getDawgModels(String... modelNames);  }