### Question:
MetaverseUtil { public static Operations convertOperationsStringToMap( String operations ) { Operations resultOps = null; if ( !Const.isEmpty( operations ) ) { try { Map<String, List<IOperation>> rawOpsMap = new JSONDeserializer<Map<String, List<IOperation>>>(). use( "values.values", Operation.class ). deserialize( operations ); resultOps = new Operations(); for ( String key : rawOpsMap.keySet() ) { resultOps.put( ChangeType.forValue( key ), rawOpsMap.get( key ) ); } } catch ( Exception e ) { resultOps = null; } } return resultOps; }  static IDocumentController getDocumentController(); static void setDocumentController( IDocumentController docController ); static IDocument createDocument(
    INamespace namespace,
    Object content,
    String id,
    String name,
    String extension,
    String mimeType ); static void addLineageGraph( final IDocument document, Graph graph ); static void enhanceEdge( Edge edge ); static void enhanceVertex( Vertex vertex ); static Operations convertOperationsStringToMap( String operations ); static Runnable getAnalyzerRunner( final IDocumentAnalyzer analyzer, final IDocument document ); static void delay(); static final String MESSAGE_PREFIX_NODETYPE; static final String MESSAGE_PREFIX_LINKTYPE; static final String MESSAGE_PREFIX_CATEGORY; static final String MESSAGE_FAILED_PREFIX; }### Answer:
@Test public void testConvertOperationsStringToMap() { assertNull( MetaverseUtil.convertOperationsStringToMap( null ) ); assertNull( MetaverseUtil.convertOperationsStringToMap( "" ) ); assertNull( MetaverseUtil.convertOperationsStringToMap( "{" ) ); assertNotNull( MetaverseUtil.convertOperationsStringToMap( "{}" ) ); Operations ops = MetaverseUtil.convertOperationsStringToMap( "{\"metadataOperations\":[{\"category\":\"changeMetadata\",\"class\":" + "\"Operation\",\"description\":\"name\"," + "\"name\":\"modified\",\"type\":\"METADATA\"}]}" ); assertNotNull( ops ); assertNull( ops.get( ChangeType.DATA ) ); List<IOperation> metadataOps = ops.get( ChangeType.METADATA ); assertNotNull( metadataOps ); assertEquals( 1, metadataOps.size() ); IOperation op = metadataOps.get( 0 ); assertEquals( Operation.METADATA_CATEGORY, op.getCategory() ); assertEquals( DictionaryConst.PROPERTY_MODIFIED, op.getName() ); assertEquals( "name", op.getDescription() ); }