Added extra SetClaim tests and split of non-api code to own class

Change-Id: I0bf92351294c61ac92865fbe67229c3964fbe523
Merge "Added extra SetClaim tests and split of non-api code to own class"