@Override
    public V getNow(V valueIfAbsent) {
        // if there is an explicit value set, we use that
        if (result != null) {
            return (V) result;
        }

        // if there already is a deserialized value set, use it.
        if (deserializedValue != VOID) {
            return (V) deserializedValue;
        }

        // otherwise, do not cache the value returned from future.getNow
        // because it might be the default valueIfAbsent
        Object value = future.getNow(valueIfAbsent);
        try {
            if (value instanceof ClientMessage) {
                return resolve(value);
            } else {
                return (value instanceof Data && deserializeResponse)
                        ? serializationService.toObject(value) : (V) value;
            }
        } catch (HazelcastSerializationException exc) {
            throw new CompletionException(exc);
        }
    }
@Test
    public void getNow_whenDoneReturnValue() {
        invocationFuture.complete(response);

        assertTrue(delegatingFuture.isDone());
        assertEquals(DESERIALIZED_VALUE, delegatingFuture.getNow(DESERIALIZED_DEFAULT_VALUE));
    }