Refactor and add tests for MassMessageSubmitJob

Change-Id: I6beb37b306bc0ed2c7c71f37721fffabe3c11c92