@Test public void getCurrentBroker() { final Broker broker = new Broker(1, "rack", new ArrayList<>()); final HashMap<Integer, Broker> map = new HashMap<>(); underTest = new WeighBridgeController(new AtomicReference<>(broker), map); assertEquals(broker, underTest.getCurrentBroker()); }
@GetMapping("/brokers/current") public Broker getCurrentBroker() { return brokerReference.get(); }
WeighBridgeController { @GetMapping("/brokers/current") public Broker getCurrentBroker() { return brokerReference.get(); } }
WeighBridgeController { @GetMapping("/brokers/current") public Broker getCurrentBroker() { return brokerReference.get(); }  }
WeighBridgeController { @GetMapping("/brokers/current") public Broker getCurrentBroker() { return brokerReference.get(); }  @GetMapping("/brokers/current") Broker getCurrentBroker(); @GetMapping("/brokers") List<Broker> getAllBrokers(); }
WeighBridgeController { @GetMapping("/brokers/current") public Broker getCurrentBroker() { return brokerReference.get(); }  @GetMapping("/brokers/current") Broker getCurrentBroker(); @GetMapping("/brokers") List<Broker> getAllBrokers();  }