XmlConverter implements Converter { @Nullable protected Resource getResource(Node node) { switch (node.getNodeName()) { case STRING_NODE_NAME: case COLOR_NODE_NAME: case DIMEN_NODE_NAME: return new Resource(node.getTextContent()); case INTEGER_NODE_NAME: return new Resource(Integer.valueOf(node.getTextContent())); case BOOL_NODE_NAME: return new Resource(Boolean.valueOf(node.getTextContent())); case STRING_ARRAY_NODE_NAME: return getResource(String.class, node.getChildNodes()); case INTEGER_ARRAY_NODE_NAME: return getResource(Integer.class, node.getChildNodes()); default: return null; } }  @Override Resources fromReader(Reader reader); @SuppressWarnings("unused") Resources fromString(String string);  }
@Test public void testGetResourceFromNodeIgnore() throws Exception { Resource entry = converter.getResource(String[].class, (Node) null); assertNull(entry); }