@Test public void build_noFormParamsNoBody_setsExplicitNullAsRequestData() throws ActionException { RestAction<Void> action = new UnsecuredRestAction(DELETE, RELATIVE_PATH); factory.buildBody(requestBuilder, action); verify(requestBuilder).setRequestData(isNull(String.class)); verify(requestBuilder, never()).setHeader(anyString(), anyString()); }
@Override public void buildBody(RequestBuilder requestBuilder, RestAction<?> action) throws ActionException { if (action.hasFormParams()) { assignBodyFromForm(requestBuilder, action); } else { assignBodyFromSerialization(requestBuilder, action); } }
DefaultBodyFactory implements BodyFactory { @Override public void buildBody(RequestBuilder requestBuilder, RestAction<?> action) throws ActionException { if (action.hasFormParams()) { assignBodyFromForm(requestBuilder, action); } else { assignBodyFromSerialization(requestBuilder, action); } } }
DefaultBodyFactory implements BodyFactory { @Override public void buildBody(RequestBuilder requestBuilder, RestAction<?> action) throws ActionException { if (action.hasFormParams()) { assignBodyFromForm(requestBuilder, action); } else { assignBodyFromSerialization(requestBuilder, action); } } @Inject  DefaultBodyFactory(
            Provider<Set<Serialization>> serializationsProvider,
            UriFactory uriFactory); }
DefaultBodyFactory implements BodyFactory { @Override public void buildBody(RequestBuilder requestBuilder, RestAction<?> action) throws ActionException { if (action.hasFormParams()) { assignBodyFromForm(requestBuilder, action); } else { assignBodyFromSerialization(requestBuilder, action); } } @Inject  DefaultBodyFactory(
            Provider<Set<Serialization>> serializationsProvider,
            UriFactory uriFactory); @Override void buildBody(RequestBuilder requestBuilder, RestAction<?> action); }
DefaultBodyFactory implements BodyFactory { @Override public void buildBody(RequestBuilder requestBuilder, RestAction<?> action) throws ActionException { if (action.hasFormParams()) { assignBodyFromForm(requestBuilder, action); } else { assignBodyFromSerialization(requestBuilder, action); } } @Inject  DefaultBodyFactory(
            Provider<Set<Serialization>> serializationsProvider,
            UriFactory uriFactory); @Override void buildBody(RequestBuilder requestBuilder, RestAction<?> action);  }