### Question:
BLS12G1AddPrecompiledContract extends AbstractBLS12PrecompiledContract { @Override public Gas gasRequirement(final Bytes input) { return Gas.of(600); } BLS12G1AddPrecompiledContract(); @Override Gas gasRequirement(final Bytes input);  }### Answer:
@Test public void shouldCalculate() { if ("input".equals(input)) { return; } final Bytes input = Bytes.fromHexString(this.input); final Bytes expectedComputation = expectedResult == null ? null : Bytes.fromHexString(expectedResult); final Bytes actualComputation = contract.compute(input, messageFrame); if (actualComputation == null) { final ArgumentCaptor<Bytes> revertReason = ArgumentCaptor.forClass(Bytes.class); verify(messageFrame).setRevertReason(revertReason.capture()); assertThat(new String(revertReason.getValue().toArrayUnsafe(), UTF_8)).isEqualTo(notes); assertThat(expectedComputation.size()).isZero(); } else { assertThat(actualComputation).isEqualTo(expectedComputation); assertThat(contract.gasRequirement(input)).isEqualTo(Gas.of(Long.parseLong(expectedGasUsed))); } }