use of org.apache.nifi.context.PropertyContext in project nifi by apache.
the class ITNiFiAtlasClient method setup.
@Before
public void setup() {
// Add your atlas server ip address into /etc/hosts as atlas.example.com
PropertyContext propertyContext = mock(PropertyContext.class);
when(propertyContext.getProperty(ReportLineageToAtlas.ATLAS_USER)).thenReturn(new MockPropertyValue("admin"));
when(propertyContext.getProperty(ReportLineageToAtlas.ATLAS_PASSWORD)).thenReturn(new MockPropertyValue("admin"));
final AtlasAuthN atlasAuthN = new Basic();
atlasAuthN.configure(propertyContext);
atlasClient = new NiFiAtlasClient(atlasAuthN.createClient(new String[] { "http://atlas.example.com:21000/" }));
}
Aggregations