@SuppressWarnings("unchecked") @Test public void testGetAll() { MongoHouseService service = new MongoHouseService(); MongoOperations op = EasyMock.createMock(MongoOperations.class); List<PersistableDevice> list = new ArrayList<PersistableDevice>(); list.add(new PersistableDevice()); EasyMock.expect(op.find((Query) EasyMock.anyObject(), (Class) EasyMock.anyObject(), (String) EasyMock.anyObject())).andReturn(list); EasyMock.replay(op); ReflectionTestUtils.setField(service, "template", op); Assert.assertNotNull(service.getAll()); }
@Override public Map<String,Object>[] getAll() { Query query = new Query(); List<PersistableDevice> list = template.find(query, PersistableDevice.class, COLLECTION_NAME); return toArray(list); }
MongoHouseService extends AbstractDawgService implements HouseService { @Override public Map<String,Object>[] getAll() { Query query = new Query(); List<PersistableDevice> list = template.find(query, PersistableDevice.class, COLLECTION_NAME); return toArray(list); } }
MongoHouseService extends AbstractDawgService implements HouseService { @Override public Map<String,Object>[] getAll() { Query query = new Query(); List<PersistableDevice> list = template.find(query, PersistableDevice.class, COLLECTION_NAME); return toArray(list); }  }
MongoHouseService extends AbstractDawgService implements HouseService { @Override public Map<String,Object>[] getAll() { Query query = new Query(); List<PersistableDevice> list = template.find(query, PersistableDevice.class, COLLECTION_NAME); return toArray(list); }  @Override void upsertStb(DawgDevice... stbs); void replace(DawgDevice... stbs); @Override Map<String,Object>[] getStbsById(String... id); @Override Map<String,Object>[] getStbsByKey(String... keys); @Override Map<String,Object>[] getStbsByQuery(String query); @Override void deleteStbById(String... id); @Override Map<String,Object> getById(String id); @Override Map<String,Object>[] getAll(); @Override Map<String, Object>[] getStbsByTag(String tag, String query); }
MongoHouseService extends AbstractDawgService implements HouseService { @Override public Map<String,Object>[] getAll() { Query query = new Query(); List<PersistableDevice> list = template.find(query, PersistableDevice.class, COLLECTION_NAME); return toArray(list); }  @Override void upsertStb(DawgDevice... stbs); void replace(DawgDevice... stbs); @Override Map<String,Object>[] getStbsById(String... id); @Override Map<String,Object>[] getStbsByKey(String... keys); @Override Map<String,Object>[] getStbsByQuery(String query); @Override void deleteStbById(String... id); @Override Map<String,Object> getById(String id); @Override Map<String,Object>[] getAll(); @Override Map<String, Object>[] getStbsByTag(String tag, String query);  }