I have an application where I want to upgrade a library from an old version to a new version (Kafka client 0.8 to 0.10). Unfortunately the the new version introduces a breaking change which forced me to fix a broken unit test by using the new method signatures.
This works fine but due to the major upgrade I want to support both versions of the library using separate build profiles - one for 0.8 and one for 0.10. I know how to do that for the dependencies themselves but what's the proper way to include a different test file depending on the build profile? Is this even the right way to approach it?
Ideally I'd be able to write the unit test to work in both versions but I haven't been able to figure out how to just yet, or whether it's even possible.