PDeclaredDescriptor implements PDescriptor { @Nonnull @Override public final String getQualifiedName(String programContext) { if (!this.programName.equals(programContext)) { return getProgramName() + "." + getName(); } return getName(); } protected  PDeclaredDescriptor(@Nonnull String programName, @Nonnull String name); @Nonnull @Override final String getProgramName(); @Nonnull @Override final String getName(); @Nonnull @Override final String getQualifiedName(String programContext); @Nullable @Override T getDefaultValue(); @Override String toString(); @Nonnull abstract PBuilder<T> builder();  }
@Test public void testGetQualifiedName() { assertEquals("MockDescriptor", mockType.getName()); assertEquals("MockDescriptor", mockType.getQualifiedName("test")); assertEquals("test.MockDescriptor", mockType.getQualifiedName("not_test")); assertEquals("test.MockDescriptor", mockType.getQualifiedName(null)); assertEquals("test.MockDescriptor", mockType.getQualifiedName()); }