Resolve merge conflicts of aedd67b6cc83b3f555886f7aae0243fba0823170 to master

Test: this is the exact code these changes were meant to give
      without conflict had the auto-merger not squashed them
      together before it tried to merge them. It was tested on
      master in this state.

Change-Id: I5cbde17fb6016e5e6b5d0b04c8f41858d708ef4a
tree: 23f33f13643b77077b15302b7c1536c7c2364f04
  1. core/
  2. services/
  3. tests/