DLEditFileEntryTypeDisplayContext { public String getAvailableLocalesString() throws PortalException { JSONArray jsonArray = JSONFactoryUtil.createJSONArray( Stream.of( getAvailableLocales() ).map( _language::getLanguageId ).collect( Collectors.toList() )); return jsonArray.toString(); } DLEditFileEntryTypeDisplayContext(
		DDM ddm, DDMStorageLinkLocalService ddmStorageLinkLocalService,
		DDMStructureLocalService ddmStructureLocalService, Language language,
		LiferayPortletRequest liferayPortletRequest,
		LiferayPortletResponse liferayPortletResponse); List<Map<String, Object>> getAdditionalPanels(
		String npmResolvedPackageName); String getAvailableFields(); Locale[] getAvailableLocales(); String getAvailableLocalesString(); String getDefaultLanguageId(); String getFieldsJSONArrayString(); String getLocalesMapString(); boolean isChangeableDefaultLanguage(); boolean isFieldNameEditionDisabled(); boolean useDataEngineEditor();  }
@Test public void testGetAvailableLocalesString() throws Exception { DLEditFileEntryTypeDisplayContext dlEditFileEntryTypeDisplayContext = new DLEditFileEntryTypeDisplayContext( _ddm, _ddmStorageLinkLocalService, _ddmStructureLocalService, _language, new MockLiferayPortletRenderRequest( new MockHttpServletRequestBuilder().withAttribute( WebKeys.DOCUMENT_LIBRARY_DYNAMIC_DATA_MAPPING_STRUCTURE, _getRandomDDMStructure() ).withParameter( "definition", RandomTestUtil.randomString() ).build()), null); Assert.assertEquals( "[\"pt_BR\"]", dlEditFileEntryTypeDisplayContext.getAvailableLocalesString()); }