### Question:
IotivityRepository { public Single<OcRes> findResources(String host) { return Single.create(emitter -> { OCEndpoint ep = OCEndpointUtil.stringToEndpoint(host, new String[1]); OCResponseHandler handler = (OCClientResponse response) -> { OCStatus code = response.getCode(); if (code == OCStatus.OC_STATUS_OK) { OcRes ocRes = new OcRes(); ocRes.parseOCRepresentation(response.getPayload()); emitter.onSuccess(ocRes); } else { emitter.onError(new Exception("Find resources error - code: " + code)); } }; if (!OCMain.doGet(OcfResourceUri.RES_URI, ep, null, handler, OCQos.HIGH_QOS)) { emitter.onError(new Exception("Find resources error")); } try { Thread.sleep(getDiscoveryTimeout() * 1_000L); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); Timber.e(ex.getMessage()); } }); } @Inject  IotivityRepository(Context ctx, DeviceDao deviceDao, PreferencesRepository prefRepository); Completable initOICStack(); Single<String> getDeviceId(); Completable setFactoryResetHandler(OCFactoryPresetsHandler handler); Observable<Device> scanUnownedDevices(); Observable<Device> scanOwnedDevices(); Completable scanHosts(); Observable<Device> scanOwnedByOtherDevices(); Single<String> getNonSecureEndpoint(Device device); Single<String> getSecureEndpoint(Device device); Single<String> getNonSecureEndpoint(List<String> endpoints); Single<String> getSecureEndpoint(List<String> endpoints); Single<OcDeviceInfo> getDeviceInfo(String endpoint); Single<OcPlatformInfo> getPlatformInfo(String endpoint); Single<String> getDeviceName(String deviceId); Completable setDeviceName(String deviceId, String deviceName); Completable updateDeviceType(String deviceId, DeviceType type, int permits); Maybe<DeviceEntity> getDeviceFromDatabase(String deviceId); int getDiscoveryTimeout(); Single<List<OcResource>> findVerticalResources(String host); Single<OcRes> findResources(String host); Observable<OcResource> discoverAllResources(String deviceId); Single<List<OcResource>> discoverVerticalResources(String deviceId); Single<OcRes> findResource(String host, String resourceType); Single<OCRepresentation> get(String host, String uri, String deviceId); Completable post(String host, String uri, String deviceId, OCRepresentation rep, Object valueArray); Completable post(String host, String uri, String deviceId, Map<String, Object> values); void close();  }### Answer:
@Test public void findResources() { }