### Question:
DecisionStorageEngine extends CommonsStorageEngine<IStratioStreamingAPI> { @Override @TimerJ protected void insert(TableMetadata targetStream, Row row, boolean isNotExists, Connection<IStratioStreamingAPI> connection) throws ExecutionException, UnsupportedException { if (isNotExists){ throw new UnsupportedException("if not exist is not supporting in Decision connector"); } String streamName = StreamUtil.createStreamName(targetStream.getName()); try { List<ColumnNameValue> streamData = new ArrayList<ColumnNameValue>(); Map<String, Cell> cells = row.getCells(); for (Map.Entry<String, Cell> cellName : cells.entrySet()) { streamData.add(new ColumnNameValue(cellName.getKey(), cellName.getValue().getValue())); } connection.getNativeConnection().insertData(streamName, streamData); } catch (StratioStreamingException e) { String msg = "Inserting data error in Decision [" + streamName + "]. " + e.getMessage(); logger.error(msg); throw new ExecutionException(msg, e); } } DecisionStorageEngine(ConnectionHandler connectionHandler);   }### Answer:
@Test public void insertTest() throws Exception { Row row = createRow(VALUE1); decisionStorageEngine.insert(createTableMetadata(), row, false,connection); verify(decisionApi, times(1)).insertData(eq(CATALOG + "_" + TABLE), anyList()); }
@Test public void insertBulkTest() throws Exception { Collection<Row> rows = new LinkedList<>(); rows.add(createRow(VALUE1)); rows.add(createRow(VALUE2)); decisionStorageEngine.insert(createTableMetadata(), rows, false,connection); verify(decisionApi, times(2)).insertData(eq(CATALOG + "_" + TABLE), anyList()); }