This be simplified to 
Assert.isTrue(resolvedDataPolicy != null ||  !StringUtils.hasText(dataPolicy),...