class MutableBucketEntry {

    private RemoteBucketState state;
    private boolean stateModified;

    public MutableBucketEntry(RemoteBucketState state) {
        this.state = state;
    }

    public MutableBucketEntry(byte[] originalStateBytes) {
        this.state = originalStateBytes == null? null : deserializeState(originalStateBytes);
    }

    public boolean exists() {
        return state != null;
    }

    public boolean isStateModified() {
        return stateModified;
    }

    public void set(RemoteBucketState state) {
        this.state = Objects.requireNonNull(state);
        this.stateModified = true;
    }

    public RemoteBucketState get() {<FILL_FUNCTION_BODY>}

    public byte[] getStateBytes(Version backwardCompatibilityVersion) {
        return serializeState(get(), backwardCompatibilityVersion);
    }

}

        if (state == null) {
            throw new IllegalStateException("'exists' must be called before 'get'");
        }
        return state;
    
<no_super_class>