Fixing set model state method and test