@Test public void testSetCurrentState() { TransmissionPolicyState tested = new TransmissionPolicyState(); tested.setCurrentState(TransmissionPolicy.BLOCKED_BUT_CAN_BE_PERSISTED); assertEquals(TransmissionPolicy.BLOCKED_BUT_CAN_BE_PERSISTED, tested.getCurrentState()); tested.setCurrentState(TransmissionPolicy.BLOCKED_AND_CANNOT_BE_PERSISTED); assertEquals(TransmissionPolicy.BLOCKED_AND_CANNOT_BE_PERSISTED, tested.getCurrentState()); }
@Override public boolean setCurrentState(TransmissionPolicy newState) { return this.currentState.getAndSet(newState) != newState; }
TransmissionPolicyState implements TransmissionPolicyStateFetcher, TransmissionPolicyStateSetter { @Override public boolean setCurrentState(TransmissionPolicy newState) { return this.currentState.getAndSet(newState) != newState; } }
TransmissionPolicyState implements TransmissionPolicyStateFetcher, TransmissionPolicyStateSetter { @Override public boolean setCurrentState(TransmissionPolicy newState) { return this.currentState.getAndSet(newState) != newState; }  }
TransmissionPolicyState implements TransmissionPolicyStateFetcher, TransmissionPolicyStateSetter { @Override public boolean setCurrentState(TransmissionPolicy newState) { return this.currentState.getAndSet(newState) != newState; }  @Override TransmissionPolicy getCurrentState(); @Override boolean setCurrentState(TransmissionPolicy newState); }
TransmissionPolicyState implements TransmissionPolicyStateFetcher, TransmissionPolicyStateSetter { @Override public boolean setCurrentState(TransmissionPolicy newState) { return this.currentState.getAndSet(newState) != newState; }  @Override TransmissionPolicy getCurrentState(); @Override boolean setCurrentState(TransmissionPolicy newState);  }