Add Deterministic getMasterKey and its junit test