Code example for NamespaceContext

Methods: getNamespaceURI

0
    } 
 
    @Test
    public void testGetNamespaceContext() { 
        NamespaceContext context = out.getNamespaceContext();
        assertTrue(context.getNamespaceURI(NAMESPACE).equals(NAMESPACE));
    } 
 
    @Test
    public void testGetPrefix() throws XMLStreamException {
        String prefix = out.getPrefix(DEFAULT_NAMESPACE);
        assertTrue(prefix.equals(DEFAULT_PREFIX));
 
        prefix = out.getPrefix(NAMESPACE);
        assertTrue(prefix.equals(PREFIX));
    } 
 
    @Test(expected = NullPointerException.class)
    public void testClose() throws XMLStreamException {
        out.close();