@Test public void testSuccess() { final String expected = randomUUID().toString(); final Response<String> response = Response.success(expected); assertEquals(expected, response.getValue()); assertNull(response.getError()); }
public static <T> Response<T> success(final T value) { return new Response<>(value, null); }
Response { public static <T> Response<T> success(final T value) { return new Response<>(value, null); } }
Response { public static <T> Response<T> success(final T value) { return new Response<>(value, null); } private  Response(final ValueT value, final Exception error); }
Response { public static <T> Response<T> success(final T value) { return new Response<>(value, null); } private  Response(final ValueT value, final Exception error); static Response<T> success(final T value); static Response<T> fail(final Exception error); }
Response { public static <T> Response<T> success(final T value) { return new Response<>(value, null); } private  Response(final ValueT value, final Exception error); static Response<T> success(final T value); static Response<T> fail(final Exception error);  }