### Question:
MinTimeUpdater { @Nullable public MinTimeUpdate onShardMinTimeUpdate(ActorRef shard, MinTimeUpdate shardMinTimeUpdate) { final int trackingComponent = shardMinTimeUpdate.trackingComponent(); for (int i = trackingComponents.size(); i < trackingComponent + 1; i++) { trackingComponents.add(new TrackingComponent(i, defaultMinimalTime, shards)); } return trackingComponents.get(trackingComponent).onShardMinTimeUpdate(shard, shardMinTimeUpdate); } MinTimeUpdater(List<ActorRef> shards, long defaultMinimalTime); void subscribe(ActorRef self); @Nullable MinTimeUpdate onShardMinTimeUpdate(ActorRef shard, MinTimeUpdate shardMinTimeUpdate);  }### Answer:
@Test public void testOnShardMinTimeUpdate() { final ActorSystem system = ActorSystem.apply("test"); final ActorRef shard1 = TestProbe.apply(system).ref(), shard2 = TestProbe.apply(system).ref(); final ArrayList<ActorRef> shards = new ArrayList<>(); shards.add(shard1); shards.add(shard2); final MinTimeUpdater minTimeUpdater = new MinTimeUpdater(shards, 0); final String id = ""; final EdgeId edgeId = new EdgeId("", ""); assertNull(minTimeUpdater.onShardMinTimeUpdate( shard2, new MinTimeUpdate(0, new GlobalTime(2, edgeId), new NodeTimes().updated(id, 1)) )); final MinTimeUpdate minTimeUpdate = minTimeUpdater.onShardMinTimeUpdate( shard1, new MinTimeUpdate(0, new GlobalTime(1, edgeId), new NodeTimes().updated(id, 3)) ); assertNotNull(minTimeUpdate); assertEquals(minTimeUpdate.minTime(), new GlobalTime(1, edgeId)); }