if you run a server in offline mode you can change client’s username like this:
Linux:
in your homedir in .minecraft
for Windows:
C:\Users\andreas\AppData\Roaming\.minecraft\
open launcher_profiles.json
and change
“displayName”: “YOUR_NAME”,
take care not to go online with this