Changed base Resource class to prevent changing of passed arguments

+added unit tests.

Closes-Bug: #1276310
Change-Id: I572a56a0c0735a62670fd9aaa53fdbc881254a8e
Merge "Changed base Resource class to prevent changing of passed arguments"