### Question:
SyntaxDefinitionASTNodeConverter implements ASTNodeConverter<SyntaxDefinition, SyntaxDefinitionConfiguration> { @Override public SyntaxDefinitionConfiguration convert(SyntaxDefinition syntaxDefinition) { SyntaxDefinitionConfiguration syntaxDefinitionConfiguration = new SyntaxDefinitionConfiguration(); syntaxDefinitionConfiguration.setContent(syntaxDefinition.getContent()); if (Optional.ofNullable(syntaxDefinition.getParameter()).isPresent()) { syntaxDefinitionConfiguration.setExposedParameter(syntaxDefinition.getParameter().getName()); } return syntaxDefinitionConfiguration; }  @Override SyntaxDefinitionConfiguration convert(SyntaxDefinition syntaxDefinition);  }### Answer:
@Test public void convertWithoutExposedParameters() { final String content = "type"; SyntaxDefinition syntaxDefinition = mock(SyntaxDefinition.class); when(syntaxDefinition.getContent()).thenReturn(content); SyntaxDefinitionASTNodeConverter converter = new SyntaxDefinitionASTNodeConverter(); SyntaxDefinitionConfiguration actual = converter.convert(syntaxDefinition); assertEquals(content, actual.getContent()); }
@Test public void convertWithExposedParameters() { final String exposedParameter = "text"; SyntaxDefinition syntaxDefinition = mock(SyntaxDefinition.class, RETURNS_DEEP_STUBS); when(syntaxDefinition.getParameter().getName()).thenReturn(exposedParameter); SyntaxDefinitionASTNodeConverter converter = new SyntaxDefinitionASTNodeConverter(); SyntaxDefinitionConfiguration actual = converter.convert(syntaxDefinition); assertEquals(exposedParameter, actual.getExposedParameter()); }