@Test @SuppressWarnings("deprecation") public void TestCancelReservation01() throws IllegalArgumentException, IllegalAccessException { TransactionTokenInfo beginTransactionToken = new TransactionTokenInfo("testTokenAttribute1", TransactionTokenType.BEGIN); TransactionToken receivedToken = new TransactionToken("aaa"); TransactionTokenContextImpl contextImpl = new TransactionTokenContextImpl(beginTransactionToken, receivedToken); ReserveCommand expectedCommand = ReserveCommand.CREATE_TOKEN; contextImpl.cancelReservation(); Field field = ReflectionUtils.findField( TransactionTokenContextImpl.class, "defaultCommand"); ReflectionUtils.makeAccessible(field); ReserveCommand resultCommand = (ReserveCommand) field.get(contextImpl); assertThat(resultCommand, is(expectedCommand)); }
@Deprecated public void cancelReservation() { reserveCommand = defaultCommand; }
TransactionTokenContextImpl implements TransactionTokenContext { @Deprecated public void cancelReservation() { reserveCommand = defaultCommand; } }
TransactionTokenContextImpl implements TransactionTokenContext { @Deprecated public void cancelReservation() { reserveCommand = defaultCommand; } TransactionTokenContextImpl(final TransactionTokenInfo tokenInfo,
            TransactionToken receivedToken); }
TransactionTokenContextImpl implements TransactionTokenContext { @Deprecated public void cancelReservation() { reserveCommand = defaultCommand; } TransactionTokenContextImpl(final TransactionTokenInfo tokenInfo,
            TransactionToken receivedToken); TransactionTokenInfo getTokenInfo(); @Deprecated @Override void createToken(); @Deprecated @Override void removeToken(); @Deprecated void cancelReservation(); ReserveCommand getReserveCommand(); @Override TransactionToken getReceivedToken(); }
TransactionTokenContextImpl implements TransactionTokenContext { @Deprecated public void cancelReservation() { reserveCommand = defaultCommand; } TransactionTokenContextImpl(final TransactionTokenInfo tokenInfo,
            TransactionToken receivedToken); TransactionTokenInfo getTokenInfo(); @Deprecated @Override void createToken(); @Deprecated @Override void removeToken(); @Deprecated void cancelReservation(); ReserveCommand getReserveCommand(); @Override TransactionToken getReceivedToken();  }