If the constant class is not static and you can add a method to your class, add a non-static method that returns the value of your constant and mock that method to return the value you need for testing.
If the constant class is static or can't support non-static methods, you may have to wrap it in a class that does, for example, a ConstantProvider
where you can have getters for the constants. Then you can insert a mock for the ConstantProvider and stub the getters as required.
A third approach is to use protected/package-protected non-static global fields in the class under test and set these values directly. This works if the global field is initialized to the constant value outside of the method under test and the test class is in the same package.