Add unit tests for execute_to_log.

Change-Id: I828f35d099c6cba5527c2f0d6240854ae9c39153