@Test public void resolveEntityReturnsNullWhenNonSecurePrimaryEntityManagerDoesNotExistForRequestedEntityType() { doReturn(false).when(this.component).isValidManager(this.patientResolver); Assert.assertNull(this.component.resolveEntity(PATIENT_1_ID)); verify(this.patientResolver, never()).get(anyString()); verify(this.familyResolver, times(1)).get(anyString()); }
@Override boolean isValidManager(@Nonnull final PrimaryEntityManager manager) { return !manager.getClass().getAnnotation(Named.class).value().endsWith(SECURE); }
DefaultPrimaryEntityResolver extends AbstractPrimaryEntityResolver { @Override boolean isValidManager(@Nonnull final PrimaryEntityManager manager) { return !manager.getClass().getAnnotation(Named.class).value().endsWith(SECURE); } }
DefaultPrimaryEntityResolver extends AbstractPrimaryEntityResolver { @Override boolean isValidManager(@Nonnull final PrimaryEntityManager manager) { return !manager.getClass().getAnnotation(Named.class).value().endsWith(SECURE); }  }
DefaultPrimaryEntityResolver extends AbstractPrimaryEntityResolver { @Override boolean isValidManager(@Nonnull final PrimaryEntityManager manager) { return !manager.getClass().getAnnotation(Named.class).value().endsWith(SECURE); }   }
DefaultPrimaryEntityResolver extends AbstractPrimaryEntityResolver { @Override boolean isValidManager(@Nonnull final PrimaryEntityManager manager) { return !manager.getClass().getAnnotation(Named.class).value().endsWith(SECURE); }    }