Legally speaking, I don't think they can compel self-incriminating testimony simply by giving you immunity. They can certainly encourage it by offering immunity in exchange, but that is not the same as compelling it.
If you invoke your Fifth Amendment right not to self-incriminate you can be served with Statutory Immunity and then forced to testify, with contempt charges if you fail to testify.
There are also several different types of voluntary immunity, which is what you're describing. Those can't be compelled because they may not prevent the government from using your testimony against you in other venues, statutory immunity does not.