Unit tests for the expected behavior of bug #1294

Change-Id: I943742f9f17334610c403dd8d0d7006142b7af68
Signed-off-by: John May <john.wilkinsonmay@gmail.com>