### Question:
LongOperations implements MathOperations<Long>, Comparator<Long> { public Long keepSignificantFigures( Long value, int numSigFigs ) { if (value == 0l) return value; if (numSigFigs < 0) return value; if (numSigFigs == 0) return 0l; int currentExp = getExponentInScientificNotation(value); int decimalShift = -currentExp + numSigFigs - 1; return roundUp(value, decimalShift); }  Class<Long> getOperandClass(); Long add( Long value1,
                     Long value2 ); Long subtract( Long value1,
                          Long value2 ); Long multiply( Long value1,
                          Long value2 ); double divide( Long value1,
                          Long value2 ); Long negate( Long value ); Long increment( Long value ); Long maximum( Long value1,
                         Long value2 ); Long minimum( Long value1,
                         Long value2 ); int compare( Long value1,
                        Long value2 ); BigDecimal asBigDecimal( Long value ); Long fromBigDecimal( BigDecimal value ); Long createZeroValue(); Long create( int value ); Long create( long value ); Long create( double value ); double sqrt( Long value ); Comparator<Long> getComparator(); Long random( Long minimum,
                        Long maximum,
                        Random rng ); double doubleValue( Long value ); float floatValue( Long value ); int intValue( Long value ); long longValue( Long value ); short shortValue( Long value ); int getExponentInScientificNotation( Long value ); Long roundUp( Long value,
                         int decimalShift ); Long roundDown( Long value,
                           int decimalShift ); Long keepSignificantFigures( Long value,
                                        int numSigFigs );  }### Answer:
@Test public void shouldKeepSignificantFigures() { assertThat(ops.keepSignificantFigures(0l, 2), is(0l)); assertThat(ops.keepSignificantFigures(1201234l, 5), is(1201200l)); assertThat(ops.keepSignificantFigures(1201254l, 5), is(1201300l)); assertThat(ops.keepSignificantFigures(1201234l, 4), is(1201000l)); assertThat(ops.keepSignificantFigures(1201234l, 3), is(1200000l)); assertThat(ops.keepSignificantFigures(1201234l, 2), is(1200000l)); assertThat(ops.keepSignificantFigures(1201234l, 1), is(1000000l)); assertThat(ops.keepSignificantFigures(-1320l, 2), is(-1300l)); }