### Question:
TagProxy implements TagTechnology { static TagProxy getTagProxy(Tag tag) throws KeypleReaderException { LOG.info("Matching Tag Type : " + tag.toString()); if (Arrays.asList(tag.getTechList()) .contains(AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_MIFARE_CLASSIC)) { LOG.debug("Tag embedded into MifareClassic"); return new TagProxy(MifareClassic.get(tag), AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_MIFARE_CLASSIC); } if (Arrays.asList(tag.getTechList()) .contains(AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_MIFARE_UL)) { LOG.debug("Tag embedded into MifareUltralight"); return new TagProxy(MifareUltralight.get(tag), AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_MIFARE_UL); } if (Arrays.asList(tag.getTechList()) .contains(AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_ISODEP)) { LOG.debug("Tag embedded into IsoDep"); return new TagProxy(IsoDep.get(tag), AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_ISODEP); } throw new KeypleReaderException("Keyple Android Reader supports only : " + AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_MIFARE_CLASSIC + ", " + AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_MIFARE_UL + ", " + AndroidNfcProtocolSettings.ProtocolSetting.NFC_TAG_TYPE_ISODEP ); } private  TagProxy(TagTechnology tagTechnology, String tech); @Override Tag getTag(); @Override void connect(); @Override void close(); @Override boolean isConnected();  }### Answer:
@Test(expected = KeypleReaderException.class) public void getTagProxyNull() throws KeypleReaderException { Tag tag = Mockito.mock(Tag.class); when(tag.getTechList()).thenReturn(new String[] {"unknown tag"}); TagProxy tagProxy = TagProxy.getTagProxy(tag); }