public static TestLinkId<?> fromDescription(Description description) {
        final TestLink testLink = description.getAnnotation(TestLink.class);
        final String externalId = testLink.externalId();
        final long internalId = testLink.internalId();
        if (!externalId.equals(TestLink.NOT_AVAILABLE)) {
            return new ExternalTestLinkId(externalId);
        } else if (internalId != 0) {
            return new InternalTestLinkId(internalId);
        } else {
            throw new IllegalArgumentException("Must set either internalId or externalId on '"
                    + description.getDisplayName() + "'");
        }
    }