How does the licensing work?

If we purchase an extension, like the SAML Single Sign On Extension, can we have it installed on on development/staging server for proofing store changes to a client in addition to the actual storefront? They will have two different urls, one is the domain of the client and the other will be a subdomain of ours.

Can it be used in a development environment on a local machine also? Those would be accessable only to a user on that machine.

Are we looking at needing 3 different licenses or will one work?