private void screenDevicesAndModules(NADeviceListResponse deviceList) {
   if (deviceList != null) {
     List<NADevice> devices = deviceList.getBody().getDevices();
     if (devices != null) {
       for (NADevice naDevice : devices) {
         onDeviceAddedInternal(naDevice);
         List<NAModule> modules = deviceList.getBody().getModules();
         if (modules != null) {
           for (NAModule naModule : modules) {
             onModuleAddedInternal(naModule);
           }
         }
       }
     }
   }
 }
 @Test
 public void testDeviceList() {
   assumeNotNull(relayId);
   assumeNotNull(thermostatId);
   NADeviceListResponse deviceList = api.devicelist("app_thermostat", relayId, false);
   NADevice relay = deviceList.getBody().getDevices().get(0);
   assertEquals(relay.getId(), relayId);
   assertTrue(relay.getModules().contains(new String(thermostatId)));
 }