JobInvocation implements JobParameters { @Override public boolean shouldReplaceCurrent() { return replaceCurrent; } private  JobInvocation(Builder builder); @NonNull @Override String getService(); @NonNull @Override String getTag(); @NonNull @Override JobTrigger getTrigger(); @Override int getLifetime(); @Override boolean isRecurring(); @NonNull @Override int[] getConstraints(); @NonNull @Override Bundle getExtras(); @NonNull @Override RetryStrategy getRetryStrategy(); @Override boolean shouldReplaceCurrent(); @Override TriggerReason getTriggerReason(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@SuppressWarnings("ConstantConditions") @Test public void testShouldReplaceCurrent() throws Exception { assertTrue( "Expected shouldReplaceCurrent() to return value passed in constructor", builder.setReplaceCurrent(true).build().shouldReplaceCurrent()); assertFalse( "Expected shouldReplaceCurrent() to return value passed in constructor", builder.setReplaceCurrent(false).build().shouldReplaceCurrent()); }