NpmComponentMetadataProducer extends DefaultComponentMetadataProducer { @Override protected boolean isPrerelease(final Component component, final Iterable<Asset> assets) { return component.version().contains("-"); } @Inject  NpmComponentMetadataProducer(final Set<ComponentMetadataProducerExtension> extensions);   }
@Test public void isReleaseWhenNoDashInVersion() throws Exception { when(component.version()).thenReturn("1.0.0"); assertThat(underTest.isPrerelease(component, emptyList()), is(false)); }
@Test public void isPreleaseWhenComponentHasDash() throws Exception { when(component.version()).thenReturn("1.0.0-pre"); assertThat(underTest.isPrerelease(component, emptyList()), is(true)); }