@Test @SuppressWarnings("deprecation") public void TestCancelReservation02() throws IllegalArgumentException, IllegalAccessException { TransactionTokenInfo beginTransactionToken = new TransactionTokenInfo("testTokenAttribute1", TransactionTokenType.BEGIN); TransactionToken receivedToken = new TransactionToken("aaa", "key", "value"); ReserveCommand expectedCommand = ReserveCommand.UPDATE_TOKEN; TransactionTokenContextImpl contextImpl = new TransactionTokenContextImpl(beginTransactionToken, receivedToken); 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();  }