### Question:
DoubleOperations implements MathOperations<Double>, Comparator<Double> { public int getExponentInScientificNotation( Double value ) { double v = Math.abs(value); int exp = 0; if (v > 1.0d) { while (v >= 10.0d) { v /= 10.0d; ++exp; } } else if (v == 0.0d) { } else if (v < 1.0d) { while (v < 1.0d) { v *= 10.0d; --exp; } } return exp; }  Class<Double> getOperandClass(); Double add( Double value1,
                       Double value2 ); Double subtract( Double value1,
                            Double value2 ); Double multiply( Double value1,
                            Double value2 ); double divide( Double value1,
                          Double value2 ); Double negate( Double value ); Double increment( Double value ); Double maximum( Double value1,
                           Double value2 ); Double minimum( Double value1,
                           Double value2 ); int compare( Double value1,
                        Double value2 ); BigDecimal asBigDecimal( Double value ); Double fromBigDecimal( BigDecimal value ); Double createZeroValue(); Double create( int value ); Double create( long value ); Double create( double value ); double sqrt( Double value ); Comparator<Double> getComparator(); Double random( Double minimum,
                          Double maximum,
                          Random rng ); double doubleValue( Double value ); float floatValue( Double value ); int intValue( Double value ); long longValue( Double value ); short shortValue( Double value ); int getExponentInScientificNotation( Double value ); Double roundUp( Double value,
                           int decimalShift ); Double roundDown( Double value,
                             int decimalShift ); Double keepSignificantFigures( Double value,
                                          int numSigFigs );  }### Answer:
@Test public void shouldReturnProperExponenentInScientificNotation() { assertEquals(-3, ops.getExponentInScientificNotation(0.0010d)); assertEquals(-3, ops.getExponentInScientificNotation(0.0020d)); assertEquals(-3, ops.getExponentInScientificNotation(0.009999d)); assertEquals(-2, ops.getExponentInScientificNotation(0.010d)); assertEquals(-2, ops.getExponentInScientificNotation(0.020d)); assertEquals(-2, ops.getExponentInScientificNotation(0.09999d)); assertEquals(-1, ops.getExponentInScientificNotation(0.10d)); assertEquals(-1, ops.getExponentInScientificNotation(0.20d)); assertEquals(-1, ops.getExponentInScientificNotation(0.9999d)); assertEquals(0, ops.getExponentInScientificNotation(0.0d)); assertEquals(0, ops.getExponentInScientificNotation(1.0d)); assertEquals(0, ops.getExponentInScientificNotation(2.0d)); assertEquals(0, ops.getExponentInScientificNotation(9.999d)); assertEquals(1, ops.getExponentInScientificNotation(10.0d)); assertEquals(1, ops.getExponentInScientificNotation(20.0d)); assertEquals(1, ops.getExponentInScientificNotation(99.999d)); assertEquals(2, ops.getExponentInScientificNotation(100.0d)); assertEquals(2, ops.getExponentInScientificNotation(200.0d)); assertEquals(2, ops.getExponentInScientificNotation(999.999d)); assertEquals(3, ops.getExponentInScientificNotation(1000.0d)); assertEquals(3, ops.getExponentInScientificNotation(2000.0d)); assertEquals(3, ops.getExponentInScientificNotation(9999.999d)); }