Adding writeOnly parameter to setMasterClient method and adding the appropriate tests