@Test
@SuppressWarnings("unchecked")
public void testGcmUpdate() throws Exception {

	final String newDeviceId = "someNewDeviceId";
	new Expectations() {{
		gcmService.send((Message) any, (List) any, anyInt); result = gcmMulticastResult;
		gcmMulticastResult.getResults(); result = Arrays.asList(gcmResult);
		gcmResult.getMessageId(); result = "someMessageId";
		gcmResult.getCanonicalRegistrationId(); result = newDeviceId;
	}};
	sender.onNewDataComplete();
	Assert.assertEquals(SenderResult.Status.UPDATE_CLIENT, sender.getSenderResult().getStatus());
	Assert.assertEquals(newDeviceId, ((GcmClient) sender.getSenderResult().getNewClient()).getGcmClientId());
}