Also add some basic tests for this implementation. Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I307ebb6db91d0c172657befb276b38ccb638f828