WindowsAzure/azure-sdk-for-java — pull request #303 by BillAtPros (2013-03-25 18:49:58+00:00)
Title: Code for Issues #301 & #112

API returns HTTP Status Code 204 when Queue is empty. In this case
calling getValue() on the ReceiveQueueMessageResult will return null.

Changed ServiceBusRestProxy:receiveMessage() now returns a null BrokeredMessage from the getValue() call in cases where the REST call returns a 204 Status Code, which indicates the Queue is empty and remained empty until recieveMessage() call times out.

Tests added in ServiceBusIntegrationTest to test empty Queues in both Receive/Delete and Peek/Lock scenarios. Updated peekLockedMessageCanBeDeleted() to function with null BrokeredMessage returned in empty Queue scenario.