Dependency Injection: Vital or Irrelevant?

What's the Code Look Like?

Abstract Interfaces

public interface OnOffDevice {
  void on();
  void off();
}
public interface SensorDevice {
  boolean isCoffeePresent();
}