RegistrationTemplate implements RegistrationOperations { public BlackberryDevice getBlackberryDevice(String devicePin) { return restOperations.getForObject(DEVICE_PINS_URL + devicePin, BlackberryDevice.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 getBlackberryDevice() { mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withResponse(jsonResource("data/device-blackberry"), responseHeaders, HttpStatus.OK, "OK")); BlackberryDevice device = urbanAirship.registrationOperations().getBlackberryDevice("pin1"); assertEquals("pin1", device.getDevicePin()); assertEquals("myalias", device.getAlias()); assertEquals(2, device.getTags().size()); assertEquals("tag1", device.getTags().get(0)); assertEquals("tag2", device.getTags().get(1)); mockServer.verify(); }