title: Akka basic program not working
body: <p>I have just started learning AKKA and written a sample program from the book Learning AKKA but the program does not run and it does not produce any useful information for further debugging. I am pasting the code files below please take a look and provide </p>
  
  <p>SetRequest.java</p>
  
  <pre><code>package com.akkademy.messages;
  
  public class SetRequest {
      private  String key;
      private  String value;
  
      public  SetRequest(String key, String value) {
          this.key = key;
          this.value = value;
      }
  
      public String getKey() {
          return key;
      }
  
      public String getValue() {
          return value;
      }
  }
  </code></pre>
  
  <p>AkkademyDB.java</p>
  
  <pre><code>package com.akkademy;
  
  import akka.actor.AbstractActor;
  import akka.event.Logging;
  import akka.event.LoggingAdapter;
  import akka.japi.pf.ReceiveBuilder;
  import com.akkademy.messages.SetRequest;
  
  import java.util.HashMap;
  import java.util.Map;
  
  public class AkkademyDB extends AbstractActor{
  
      protected final LoggingAdapter log  = Logging.getLogger(context().system(),this);
      protected final Map&lt;String,Object&gt; map = new HashMap&lt;&gt;();
  
      private AkkademyDB(){
          receive(ReceiveBuilder.match(SetRequest.class,message-&gt;{
              log.info("Received set request-key:{} value: {}",message.getKey(),message.getValue());
          }).matchAny(o-&gt;log.info("received unknown message {}",o)).build()
          );
      }
  
  
  }
  </code></pre>
  
  <p>AkkademyDBTest.java</p>
  
  <pre><code>package com.akkademy;
  
  import akka.actor.ActorSystem;
  import akka.actor.Props;
  import akka.testkit.TestActorRef;
  import com.akkademy.messages.SetRequest;
  import akka.actor.ActorRef;
  import org.junit.Test;
  
  import static junit.framework.Assert.assertEquals;
  
  
  public class AkkademyDBTest {
  
      ActorSystem system =  ActorSystem.create();
  
      @Test
      public void itShouldPlaceKeyValueFromSetMessageIntoMap() {
          TestActorRef&lt;AkkademyDB&gt; actorRef = TestActorRef.create(system, Props.create(AkkademyDB.class));
          actorRef.tell(new SetRequest("key","value"),ActorRef.noSender());
          AkkademyDB akkademyDB = actorRef.underlyingActor();
          assertEquals(akkademyDB.map.get("key"),"value");
  
  
      }
  }
  </code></pre>
  
  <p>build.sbt</p>
  
  <pre><code>name := """akkademy-db"""
  
  version := "1.0"
  
  scalaVersion := "2.11.1"
  
  libraryDependencies ++= Seq(
    "com.typesafe.akka" % "akka-actor_2.11" % "2.3.6",
    "com.typesafe.akka" % "akka-testkit_2.11" % "2.5.6" % "test",
    "junit" % "junit" % "4.12" % "test",
    "com.novocode" % "junit-interface" % "0.10" % "test")
  </code></pre>
  
  <p>Error Message received when running the test file is</p>
  
  <pre><code>/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit5-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/lib/tools.jar:/Users/madhurjain/akkademy-db/target/scala-2.11/test-classes:/Users/madhurjain/akkademy-db/target/scala-2.11/classes:/Users/madhurjain/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.2.jar:/Users/madhurjain/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.6.jar:/Users/madhurjain/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar:/Users/madhurjain/.ivy2/cache/org.scala-tools.testing/test-interface/jars/test-interface-0.5.jar:/Users/madhurjain/.ivy2/cache/junit/junit-dep/jars/junit-dep-4.10.jar:/Users/madhurjain/.ivy2/cache/com.novocode/junit-interface/jars/junit-interface-0.10.jar:/Users/madhurjain/.ivy2/cache/com.typesafe/config/bundles/config-1.3.1.jar:/Users/madhurjain/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.5.6.jar:/Users/madhurjain/.ivy2/cache/com.typesafe.akka/akka-testkit_2.11/jars/akka-testkit_2.11-2.5.6.jar:/Users/madhurjain/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.11.jar:/Users/madhurjain/.ivy2/cache/org.scala-lang.modules/scala-java8-compat_2.11/bundles/scala-java8-compat_2.11-0.7.0.jar:/Users/madhurjain/.ivy2/cache/junit/junit/jars/junit-4.12.jar:/Users/madhurjain/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar" com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.akkademy.AkkademyDBTest
  [INFO] [10/25/2017 17:59:59.509] [main] [akka://default/user/$$a] Received set request-key:key value: value
  
  junit.framework.AssertionFailedError: 
  Expected :null
  Actual   :value
   &lt;Click to see difference&gt;
  
  
      at junit.framework.Assert.fail(Assert.java:50)
      at junit.framework.Assert.failNotEquals(Assert.java:287)
      at junit.framework.Assert.assertEquals(Assert.java:67)
      at junit.framework.Assert.assertEquals(Assert.java:74)
      at com.akkademy.AkkademyDBTest.itShouldPlaceKeyValueFromSetMessageIntoMap(AkkademyDBTest.java:22)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  </code></pre>