HosebirdReader { @VisibleForTesting @SuppressWarnings("checkstyle:designforextension") protected void setRetry(final boolean shouldRetry) { this.retry.set(shouldRetry); } HosebirdReader(); final void run(final String[] args);  }
@Test public void can_set_retry() { HosebirdReader tr = new ConcreteHosebirdReader(); tr.setRetry(true); try { Field f = tr.getClass().getSuperclass().getDeclaredField("retry"); f.setAccessible(true); AtomicBoolean retry = (AtomicBoolean) f.get(tr); assertEquals(true, retry.get()); } catch(Exception e) { assertNull(e); } }