### Question:
AsyncMessageEngine extends DelayMessageEngine { protected int computeDelayFunction(int lambda) { return (int) Math.round(Math.log(1 - random.nextDouble()) / (-1.0 / lambda)); } AsyncMessageEngine(Topology topology);  AsyncMessageEngine(Topology topology, int averageDuration, Type type); @Override void onClock(); int getAverageDuration(); void setAverageDuration(int averageDuration); @Override @Deprecated void setDelay(int delay); @Override @Deprecated int getDelay(); static final int DEFAULT_AVERAGE_DURATION; static final Type DEFAULT_TYPE; }### Answer:
@Test void computeDelayFunction_minOk() { boolean minReached = false; int minCount = 0; int lesserCount = 0; int maxValue = 0; for(int i = 0; i < NB_OCCURRENCES; i++) { int current = messageEngine.computeDelayFunction(LAMBDA); assertTrue(current>= MINIMUM_VALUE); if(current == MINIMUM_VALUE) { minReached = true; minCount++; } if(current <= LAMBDA) lesserCount++; if(current > maxValue) maxValue = current; } assertTrue(minReached); }