RegistrationTemplate implements RegistrationOperations { public IOSDevice getIOSDevice(String deviceToken) { return restOperations.getForObject(DEVICE_TOKENS_URL + deviceToken, IOSDevice.class); } RegistrationTemplate(RestOperations restOperations); void registerIOSDevice(IOSDeviceConfig deviceConfig); void registerAndroidDevice(AndroidDeviceConfig deviceConfig); void registerBlackberryDevice(BlackberryDeviceConfig deviceConfig); IOSDevice getIOSDevice(String deviceToken); AndroidDevice getAndroidDevice(String apid); BlackberryDevice getBlackberryDevice(String devicePin); void removeIOSDevice(String deviceToken); void removeAndroidDevice(String apid); void removeBlackberryDevice(String devicePin);  }
@Test public void getIOSDevice() { mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withResponse(jsonResource("data/device-ios"), responseHeaders, HttpStatus.OK, "OK")); IOSDevice device = urbanAirship.registrationOperations().getIOSDevice(DEVICE_TOKEN); assertEquals(DEVICE_TOKEN, device.getDeviceToken()); assertEquals("habuma", device.getAlias()); assertEquals(2, device.getTags().size()); assertEquals("tag1", device.getTags().get(0)); assertEquals("tag2", device.getTags().get(1)); assertEquals(4, device.getBadge()); mockServer.verify(); }