@Test
public void artifactKnownButNotPromotedTest() {

	// Returning the message for unpublished artifact at promote time
    DbArtifact a = new DbArtifact();
    a.setPromoted(false);
    a.setGroupId("com.axway.toto");
    a.setSha256("6554ed3d1ab007bd81d3d57ee27027510753d905277d5b5b8813e5bd516e821c");
    when(repositoryHandler.getArtifactUsingSHA256(a.getSha256())).thenReturn(a);
    
    ArtifactQuery artifactQuery = new ArtifactQuery("User", 1, "File1", "6554ed3d1ab007bd81d3d57ee27027510753d905277d5b5b8813e5bd516e821c", "filetype1", "");
    MultivaluedMap<String, String> params = makeParams(artifactQuery);
    Messages.init(templatePath);
    WebResource resource = client().resource("/" + ServerAPI.ARTIFACT_RESOURCE + "/isPromoted");
    ClientResponse response = resource.queryParams(params).type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
    assertEquals(ClientResponse.Status.OK, response.getClientResponseStatus());
    String entity = response.getEntity(String.class);
    assertTrue(entity.contains(Messages.get(MessageKey.ARTIFACT_VALIDATION_NOT_PROMOTED_YET)));
}