List of usage examples for org.apache.commons.lang.builder ReflectionToStringBuilder toString
public static String toString(Object object)
Builds a toString
value using the default ToStringStyle
through reflection.
From source file:uk.co.sdev.async.http.AbstractParallel2SequentialCompletableFutureTest.java
@Test public void shouldReturnNoneIfDivideReturnsServiceUnavailable() throws Exception { stubGet("/numerator", new Numerator(new BigDecimal("7.2"))); stubGet("/denominator", new Denominator(new BigDecimal("2.5"))); stubGet("/divide/7.2/2.5", 503); HandOff<Optional<Quotient>> handOff = new HandOff<>(); sequential(parallel(getNumerator(), getDenominator()), divideFunc) .whenComplete((quotient, throwable) -> handOff.put(quotient)); Optional<Quotient> quotient = handOff.get(3); assertThat(quotient.isPresent(), is(false)); List<LoggedRequest> gets = findAll(getRequestedFor(urlMatching(".*"))); for (LoggedRequest get : gets) { System.out.println(ReflectionToStringBuilder.toString(get)); }//from w w w .j a v a2 s . co m assertThat(gets.size(), is(3)); }