Trying to figure out how to write Jasmine tests for this.