About this question
I know that the inverted test pyramid, i.e., having more end-to-end tests than unit tests is an anti-pattern.
However, I've started to think, what could be the advantage of having less unit tests then tests of higher levels, black box tests, talking to a tested component through some API/protocol, e.g. (SOAP, REST, etc.).
The only advantage I’ve found is when I migrate the component from one language to another but preserve the same component API/protocol.
In such a case, having high test coverage for API gives me much confidence that the migration went fine. Unit tests do not give this confidence, because they are tightly bound to the programming language, and when I migrate the code under tests from one language to another, I need to migrate unit tests, which means the possibility to introduce bugs to unit tests as well. Plus more effort.
Any other advantages of having more integration tests than unit tests?