BatchProcessingContext { public boolean containsAttribute(String key) { return attributes.containsKey(key); } BatchProcessingContext(); LogDataStore createLogDataStore(LogDataStoreType type); void saveLogDataStore(String fileBaseName, String logName); void saveLogDataStore(OutputStream out, String logName); void printIfVerbose(String message); void printIfVerbose(String message, Object... args); @SuppressWarnings("unchecked") T getAttribute(String key, Class<T> clazz); T getAttribute(String key, Class<T> clazz, T defaultValue); void setAttribute(String key, Object value); boolean containsAttribute(String key); List<FileObject> getAllFiles(); void setAllFiles(List<FileObject> allFiles); FileObject getCurrentFile(); void setCurrentFile(FileObject currentFile); DataConfiguration getConfiguration(); void setConfiguration(DataConfiguration configuration); boolean isVerbose(); void setVerbose(boolean verbose); LogDataStore getDataStore();  }
@Test public void testContainsAttribute() { batchProcessingContext.setAttribute("A", "C"); AssertJUnit.assertTrue(batchProcessingContext.containsAttribute("A")); AssertJUnit.assertFalse(batchProcessingContext.containsAttribute("B")); }