deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Pestano <>
Subject CDI Test control MessageBundle
Date Thu, 02 Apr 2015 14:10:50 GMT
Hi guys,

i'm having some problems to create a simple test using test control module
in an EE6 app.

Class under test:

public interface Messages {

  String systemInfo();


public class MessagesTest {

  Messages messages;

  public void deveLerMensagemDoBundle(){
    assertEquals(messages.systemInfo(),"System info");

1 - the above dependencies were not sufficient:


needed to add


otherwise i get: java.lang.NoClassDefFoundError:

2 - beans.xml in test/resources/META-INF was not suffcient

needed to add beans.xml to src/main/resources/META-INF

otherwise i get:

 WELD-001408: Unsatisfied dependencies for type Messages with qualifiers
  at injection point [BackedAnnotatedField] @Inject

3 - In the test the line: *messages.systemInfo() *return
"???label.system-info???" meaning taht the key was not found in the message
bundle although when running the application the message is found.

My is located at *src/main/resources*.

Any help is appreciated.

Thanks in advance.


Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
@realpestano <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message