### Question:
WorkflowExecutionContext { public static String getFilePath(String logDir, String entityName, String entityType, EntityOperations operation) { String parentSuffix = EntityType.PROCESS.name().equals(entityType) || EntityOperations.REPLICATE == operation ? "" : "/context/"; return new Path(logDir + parentSuffix, entityName + "-wf-post-exec-context.json").toString(); } WorkflowExecutionContext(Map<WorkflowExecutionArgs, String> context); String getValue(WorkflowExecutionArgs arg); void setValue(WorkflowExecutionArgs arg, String value); String getValue(WorkflowExecutionArgs arg, String defaultValue); boolean containsKey(WorkflowExecutionArgs arg); Set<Map.Entry<WorkflowExecutionArgs, String>> entrySet(); boolean hasWorkflowSucceeded(); boolean hasWorkflowFailed(); boolean isWorkflowKilledManually(); boolean hasWorkflowTimedOut(); boolean hasWorkflowBeenKilled(); String getContextFile(); Status getWorkflowStatus(); String getLogDir(); String getLogFile(); String getNominalTime(); String getNominalTimeAsISO8601(); boolean hasTimeStamp(); long getTimeStampAsLong(); String getTimeStampAsISO8601(); String getClusterName(); String getSrcClusterName(); String getEntityName(); String getEntityType(); EntityOperations getOperation(); String getOutputFeedNames(); String[] getOutputFeedNamesList(); String getOutputFeedInstancePaths(); String[] getOutputFeedInstancePathsList(); String getInputFeedNames(); String[] getInputFeedNamesList(); String getInputFeedInstancePaths(); String[] getInputFeedInstancePathsList(); String getWorkflowEngineUrl(); String getUserWorkflowEngine(); String getUserWorkflowVersion(); String getWorkflowId(); String getWorkflowParentId(); String getUserSubflowId(); int getWorkflowRunId(); String getWorkflowRunIdString(); String getWorkflowUser(); long getExecutionCompletionTime(); String getDatasourceName(); long getWorkflowStartTime(); long getWorkflowEndTime(); Type getContextType(); String getCounters(); void serialize(); void serialize(String contextFile); @Override String toString(); @SuppressWarnings("unchecked") static WorkflowExecutionContext deSerialize(String contextFile); static String getFilePath(String logDir, String entityName, String entityType,
                                     EntityOperations operation); static Path getCounterFile(String logDir); static String readCounters(FileSystem fs, Path counterFile); static WorkflowExecutionContext create(String[] args, Type type); static WorkflowExecutionContext create(String[] args, Type type, Configuration conf); static WorkflowExecutionContext create(Map<WorkflowExecutionArgs, String> wfProperties); static WorkflowExecutionContext create(Map<WorkflowExecutionArgs, String> wfProperties, Type type); static final String INSTANCE_FORMAT; static final String OUTPUT_FEED_SEPARATOR; static final String INPUT_FEED_SEPARATOR; static final String CLUSTER_NAME_SEPARATOR; static final WorkflowExecutionArgs[] USER_MESSAGE_ARGS; }### Answer:
@Test public void testGetFilePathForFeedRetention() throws Exception { final String filePath = WorkflowExecutionContext.getFilePath(LOGS_DIR, ENTITY_NAME, "FEED", WorkflowExecutionContext.EntityOperations.DELETE); Assert.assertEquals(filePath, LOGS_DIR + "/context/" + ENTITY_NAME + "-wf-post-exec-context.json"); }