Add tests for swap size calculation

Closes-bug: #1262521
Change-Id: I3ea5b1cdf4caaf2ea67ea3116440fcf1fa8c2994
Merge "Add tests for swap size calculation"