You design the new component so that the reusable part is constructor-injected into it. In the test suite for the new component, you only write tests for the behavior that strictly relates to the new component itself. You inject a mock to "simulate" misc scenarios involving the reusable component, but you only "simulate" as much as needed for a specific test method. I.e., the mock (or the way it's configured) is specific to each particular test method, and only returns canned values and supports called methods, without actually replicating the internal workings of the real dependency.
↧