AbstractOpWithTimeout extends AbstractOp { final int getTimeoutMs() { return timeoutMs; } AbstractOpWithTimeout(int msgType, int msgParts, int timeoutMs); @Override Object attempt(final Connection connection);  }
@Test public void getTimeoutMs() { final AbstractOpWithTimeout mockOp = mock(AbstractOpWithTimeout.class, withSettings().useConstructor(0, 0, 123).defaultAnswer(CALLS_REAL_METHODS)); assertThat(mockOp.getTimeoutMs()).isEqualTo(123); }