<p>will.</p>

@param stub a {@link com.greenpepper.call.Stub} object.
@return a {@link com.greenpepper.call.StubSyntax} object.
183088
public StubSyntax will( Stub stub )
    {
        ResultHandler handler = new ResultHandler( stub );
        handlers.add( handler );
        return handler;
    }
692527
@Deprecated
    public JsonFluentAssert hasSameStructureAs(Object expected) {
        Diff diff = createDiff(expected, configuration.withOptions(COMPARING_ONLY_STRUCTURE));
        diff.failIfDifferent();
        return this;
    }
1110135
protected function populateStub($model, $stub)
    {
        $stub = str_replace('DummyClass', $this->getClassName($model), $stub);

        $stub = str_replace('DummyModel', $model, $stub);

        return $stub;
    }
57794
public static <T> MatcherDecoratorsBuilder<T> should(final Matcher<? super T> matcher) {
        return MatcherDecoratorsBuilder.should(matcher);
    }
153414
private String set(ChaincodeStub stub, List<String> args) {
        if (args.size() != 2) {
            throw new RuntimeException("Incorrect arguments. Expecting a key and a value");
        }
        stub.putStringState(args.get(0), args.get(1));
        return args.get(1);
    }
814265
private static void generateSingleReadMethod(PrefsEntity entity) {
		// read method
		PrefsTransform transform;
		Converter<String, String> converter = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_CAMEL);

		for (PrefsProperty item : entity.getCollection()) {
			MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("get" + converter.convert(item.getName())).addModifiers(Modifier.PUBLIC)
					.addJavadoc("reads property <code>$L</code> from shared pref with key <code>$L</code>\n\n", item.getName(), item.getPreferenceKey())
					.addJavadoc("@return property $L value\n", item.getName()).returns(item.getPropertyType().getTypeName());

			if (item.hasTypeAdapter()) {
				transform = PrefsTransformer.lookup(item.typeAdapter.getDataTypeTypename());
			} else {
				transform = PrefsTransformer.lookup(item);
			}

			transform.generateReadProperty(methodBuilder, "prefs", typeName(item.getElement().asType()), "defaultBean", item, false, ReadType.RETURN);

			builder.addMethod(methodBuilder.build());
		}

	}
608076
StubParser adhocSolutions(String value) {
		if (Boolean.toString(true).equals(value)) {
			return new StubParser(this) {

				@Override
				public JsonToken nextToken() {
					return JsonToken.VALUE_TRUE;
				}

				@Override
				public JsonToken getCurrentToken() {
					return JsonToken.VALUE_TRUE;
				}
			};
		} else if (Boolean.toString(false).equals(value)) {
			return new StubParser(this) {

				@Override
				public JsonToken nextToken() {
					return JsonToken.VALUE_FALSE;
				}

				@Override
				public JsonToken getCurrentToken() {
					return JsonToken.VALUE_FALSE;
				}
			};
		} else if ("null".equals(value)) {
			return new StubParser(this) {

				@Override
				public JsonToken nextToken() {
					return JsonToken.VALUE_NULL;
				}

				@Override
				public JsonToken getCurrentToken() {
					return JsonToken.VALUE_NULL;
				}
			};
		} else if (value.startsWith("\"") && value.endsWith("\"")) {
			final StringBuilder builder = new StringBuilder(value);
			builder.deleteCharAt(0);
			builder.setLength(builder.length() - 1);
			return new StubParser(this) {

				@Override
				public JsonToken nextToken() {
					return JsonToken.VALUE_STRING;
				}

				@Override
				public JsonToken getCurrentToken() {
					return JsonToken.VALUE_STRING;
				}

				@Override
				public String getText() {
					return builder.toString();
				}
			};
		} else {
			try {
				final BigDecimal decimal = new BigDecimal(value);
				return new StubParser(this) {

					@Override
					public JsonToken nextToken() {
						try {
							decimal.longValueExact();
							return JsonToken.VALUE_NUMBER_INT;
						} catch (ArithmeticException e) {
							return JsonToken.VALUE_NUMBER_FLOAT;
						}
					}

					@Override
					public JsonToken getCurrentToken() {
						try {
							decimal.longValueExact();
							return JsonToken.VALUE_NUMBER_INT;
						} catch (ArithmeticException e) {
							return JsonToken.VALUE_NUMBER_FLOAT;
						}
					}

					@Override
					public short getShortValue() {
						return decimal.shortValue();
					}

					@Override
					public int getIntValue() {
						return decimal.intValue();
					}

					@Override
					public float getFloatValue() {
						return decimal.floatValue();
					}

					@Override
					public long getLongValue() {
						return decimal.longValue();
					}

					@Override
					public double getDoubleValue() {
						return decimal.doubleValue();
					}

					@Override
					public BigInteger getBigIntegerValue() {
						return decimal.toBigInteger();
					}

					@Override
					public BigDecimal getDecimalValue() {
						return decimal;
					}
				};
			} catch (NumberFormatException e) {
			}
		}
		return null;
	}
894544
@Override
    public Response init(ChaincodeStub stub) {
        try {
            // Get the args from the transaction proposal
            List<String> args = stub.getParameters();
            if (args.size() != 2) {
                newErrorResponse("Incorrect arguments. Expecting a key and a value");
            }
            // Set up any variables or assets here by calling stub.putState()
            // We store the key and the value on the ledger
            stub.putStringState(args.get(0), args.get(1));
            return newSuccessResponse();
        } catch (Throwable e) {
            return newErrorResponse("Failed to create asset");
        }
    }
338732
@Override
    @FFDCIgnore(BAD_OPERATION.class)
    public Object narrow(Object narrowFrom, @SuppressWarnings("rawtypes") Class narrowTo) throws ClassCastException {
        if (narrowFrom == null) {
            return null;
        }

        if (narrowTo.isInstance(narrowFrom)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "object is already an instance");
            return narrowFrom;
        }

        if (!!!(narrowFrom instanceof ObjectImpl))
            throw new ClassCastException(narrowTo.getName());

        if (IDLEntity.class.isAssignableFrom(narrowTo))
            return super.narrow(narrowFrom, narrowTo);

        Class<?> stubClass = loadStubClass(narrowTo);
        if (stubClass == null) {
            // The stub class could not be loaded.  Fallback to the default
            // implementation to allow it to dynamically generate one.
            return super.narrow(narrowFrom, narrowTo);
        }

        Object stubObject;
        try {
            stubObject = stubClass.newInstance();
        } catch (Throwable t) {
            // This will fail if the stub class is "invalid" (missing default
            // constructor, non-public default constructor, logic in the
            // constructor that throws, etc.).
            ClassCastException e = new ClassCastException(narrowTo.getName());
            e.initCause(t);
            throw e;
        }

        // This will fail if the loaded class does not actually extend Stub.
        Stub stub = (Stub) stubObject;

        try {
            stub._set_delegate(((ObjectImpl) narrowFrom)._get_delegate());
        } catch (org.omg.CORBA.BAD_OPERATION e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "unable to copy delegate", e);
        }

        // This will fail if the loaded stub class does not implement the
        // interface. For example, narrow was called with one version of the
        // interface, but the context class loader loaded a stub that
        // implemented a different version of the interface.
        return narrowTo.cast(stub);
    }
806728
def _get_stub(self, table, create):
        
        if table is None:
            return BLANK_STUB
        else:
            if create:
                stub = CREATE_STUB
            else:
                stub = UPDATE_STUB

            return stub
663671
public static <A> Will<A> of(A value) {
        return new Of<A>(Futures.immediateFuture(value));
    }
775013
static OcAgentTraceServiceConfigRpcHandler create(
      TraceServiceStub stub, TraceConfig traceConfig) {
    OcAgentTraceServiceConfigRpcHandler configRpcHandler =
        new OcAgentTraceServiceConfigRpcHandler(traceConfig);
    UpdatedLibraryConfigObserver updatedLibraryConfigObserver =
        new UpdatedLibraryConfigObserver(traceConfig, configRpcHandler);
    try {
      StreamObserver<CurrentLibraryConfig> currentConfigObserver =
          stub.config(updatedLibraryConfigObserver);
      configRpcHandler.setCurrentConfigObserver(currentConfigObserver);
    } catch (StatusRuntimeException e) {
      configRpcHandler.onComplete(e);
    }
    return configRpcHandler;
  }
414144
public static <A> Will<A> failedWill(Throwable throwable) {
        return forListenableFuture(Futures.<A>immediateFailedFuture(throwable));
    }
605399
protected function replaceNamespace(&$stub)
    {
        $stub = str_replace(
            ['DummyVendor', 'DummyName', 'DummyLowerVendor', 'DummyLowerName'],
            [$this->getVendorInput(), $this->getNameInput(), strtolower($this->getVendorInput()), strtolower($this->getNameInput())],
            $stub
        );

        return $this;
    }
785127
protected function compileMethods($stub, array $methods)
    {
        foreach ($methods as $method) {
            $stub = str_replace(['{{' . $method . '}}', '{{/' . $method . '}}'], '', $stub);
        }

        foreach ($this->methods as $method) {
            $stub = preg_replace('/{{' . $method . '}}(.*){{\/' . $method . '}}(\r\n)?/s', '', $stub);
        }

        return $stub;
    }
1365478
public static <A> Will<A> forFuture(Future<A> future) {
        return forListenableFuture(JdkFutureAdapters.listenInPoolThread(future));
    }
608149
@Nonnull
  public static StubObject createForCurrentUserAndID (@Nonnull @Nonempty final String sID,
                                                      @Nullable final Map <String, String> aCustomAttrs)
  {
    return new StubObject (sID, LoggedInUserManager.getInstance ().getCurrentUserID (), aCustomAttrs);
  }