@Test public final void testGetGUIDByteArray() { byte[] baguid = null; GUID guid = null; try { guid = GUIDReader.getGUID(BASE32); baguid = guid.getBytes(); } catch (final InvalidGuidOperationException e) { LOGGER.error(ResourcesPublicUtilTest.SHOULD_NOT_HAVE_AN_EXCEPTION, e); fail(ResourcesPublicUtilTest.SHOULD_NOT_HAVE_AN_EXCEPTION); } try { final GUID bguid = GUIDReader.getGUID(baguid); assertEquals(bguid, guid); } catch (final InvalidGuidOperationException e) { LOGGER.error(ResourcesPublicUtilTest.SHOULD_NOT_HAVE_AN_EXCEPTION, e); fail(ResourcesPublicUtilTest.SHOULD_NOT_HAVE_AN_EXCEPTION); } try { GUIDReader.getGUID((byte[]) null); fail(ResourcesPublicUtilTest.SHOULD_HAVE_AN_EXCEPTION); } catch (final InvalidGuidOperationException e) { } try { GUIDReader.getGUID(new byte[0]); fail(ResourcesPublicUtilTest.SHOULD_HAVE_AN_EXCEPTION); } catch (final InvalidGuidOperationException e) { } try { final byte[] ba = {1, 2}; GUIDReader.getGUID(ba); fail(ResourcesPublicUtilTest.SHOULD_HAVE_AN_EXCEPTION); } catch (final InvalidGuidOperationException e) { } }
public static final GUID getGUID(String guid) throws InvalidGuidOperationException { return new GUIDImpl(guid); }
GUIDReader { public static final GUID getGUID(String guid) throws InvalidGuidOperationException { return new GUIDImpl(guid); } }
GUIDReader { public static final GUID getGUID(String guid) throws InvalidGuidOperationException { return new GUIDImpl(guid); } private  GUIDReader(); }
GUIDReader { public static final GUID getGUID(String guid) throws InvalidGuidOperationException { return new GUIDImpl(guid); } private  GUIDReader(); static final GUID getGUID(String guid); static final GUID getGUIDUnsafe(String guid); static final GUID getGUID(byte[] guid); }
GUIDReader { public static final GUID getGUID(String guid) throws InvalidGuidOperationException { return new GUIDImpl(guid); } private  GUIDReader(); static final GUID getGUID(String guid); static final GUID getGUIDUnsafe(String guid); static final GUID getGUID(byte[] guid);  }