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);  }
@Test public void testSuccess() { final String expected = randomUUID().toString(); final Response<String> response = Response.success(expected); assertEquals(expected, response.getValue()); assertNull(response.getError()); }