Document () { // needed for testing String text = System.getProperty(POLICY_TEXT_PROPERTY, null); if (text != null) { Document fromProperty = new Document(PRIVACY_POLICY_DOCUMENT_NAME, text); if (!fromProperty.getVersion().isUnknown()) { return fromProperty; } } String docName = getDocumentName(); Document fromFile = loadContent(docName, getDocumentContentFile(docName)); if (fromFile != null && !fromFile.getVersion().isUnknown()) { return fromFile; } return loadContent(docName, getBundledResourcePath(docName)); }