final String channelId = UUID.randomUUID().toString();
final String uaid = UUIDUtil.newUAID();
final RegisterResponse registerResponse = server.handleRegister(new RegisterMessageImpl(channelId), uaid);
final String endpointToken = extractEndpointToken(registerResponse.getPushEndpoint());
Notification notification = server.handleNotification(endpointToken, "version=1");
assertThat(notification.ack(), equalTo((Ack)new AckImpl(channelId, 1L)));
assertThat(server.getChannel(channelId).getVersion(), is(1L));
server.handleNotification(endpointToken, "version=2");
assertThat(server.getChannel(channelId).getVersion(), is(2L));
}