I am trying to write unit test for the following class
I was wondering if I need to mock the Dependency class (consider that it is purely logic no DB or external rest calls are made).
I was thinking if I will not mock the Dependency class, then anyway it will be covered by the CUT
or should I mock it and write separate unit test suite for Dependency class public interface.
public class ClassUnderTest {
  @Autowired
  private Dependency dependency;
  public Object foo(){
    // do something
    var = dependeny.bar(args..);
    // do somethig
  }
}
public class Dependency {
  public Object bar(args..){
    // do something
  }
}