@Test( expected = IllegalArgumentException.class )
public void shouldNotAllowNullNamespaceRegistryWithNonNullTextEncoder() {

    TextEncoder encoder = mock(TextEncoder.class);
    path.getString((NamespaceRegistry)null, encoder);
}