SimpleSuccessDecider extends AbstractSuccessDecider { @Override public boolean wasSuccessful( Long[] run1, Long[] run2 ) { double result = calculateRatio( run1, run2 ); if ( result >= 0 ) { double d = Math.round( result * 100.0 ) / 100.0; boolean successful = d > payloadSuccessThreshold; return successful; } else { return false; } }  @Override boolean wasSuccessful( Long[] run1, Long[] run2 ); @Override Efficiency getEfficency( Long[] run1, Long[] run2 );  }
@Test public void wasSuccessfulTest() { Long[] run1 = { 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l }; Long[] run2 = { 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l }; assertThat( simpleSuccessDecider.wasSuccessful( run1, run2 ), is( Boolean.FALSE ) ); run2 = new Long[] { 8l, 8l, 8l, 8l, 8l, 8l, 8l, 8l, 8l, 8l }; assertThat( simpleSuccessDecider.wasSuccessful( run1, run2 ), is( Boolean.TRUE ) ); }