test_class.declarator: exception = ExpectedException.none()
test_class.modifier: @Rule
    public final
test_class.original_string: @Rule
    public final ExpectedException exception = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: exception
test_class.file: session-replacement/src/test/java/com/amadeus/session/TestEncryptingSerializerDeserializer.java
test_class.identifier: TestEncryptingSerializerDeserializer
test_case.body: @Test
    public void testBadKey() {
      EncryptingSerializerDeserializer serializer = new EncryptingSerializerDeserializer();
      exception.expectCause(isA(NullPointerException.class));
      serializer.initKey(null);
    }
test_case.class_method_signature: TestEncryptingSerializerDeserializer.testBadKey()
test_case.full_signature: @Test public void testBadKey()
test_case.identifier: testBadKey
test_case.invocations: expectCause isA initKey
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBadKey()
focal_class.declarator: wrapped
focal_class.modifier: private final
focal_class.original_string: private final SerializerDeserializer wrapped;
focal_class.type: SerializerDeserializer
focal_class.var_name: wrapped
focal_class.declarator: secretKey
focal_class.modifier: private
focal_class.original_string: private SecretKeySpec secretKey;
focal_class.type: SecretKeySpec
focal_class.var_name: secretKey
focal_class.declarator: random
focal_class.modifier: private
focal_class.original_string: private SecureRandom random;
focal_class.type: SecureRandom
focal_class.var_name: random
focal_class.file: session-replacement/src/main/java/com/amadeus/session/EncryptingSerializerDeserializer.java
focal_class.identifier: EncryptingSerializerDeserializer
focal_class.interfaces: implements SerializerDeserializer
focal_class.class_method_signature: EncryptingSerializerDeserializer.EncryptingSerializerDeserializer()
focal_class.full_signature: public  EncryptingSerializerDeserializer()
focal_class.identifier: EncryptingSerializerDeserializer
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  EncryptingSerializerDeserializer()
focal_class.class_method_signature: EncryptingSerializerDeserializer.EncryptingSerializerDeserializer(SerializerDeserializer wrapped)
focal_class.full_signature: public  EncryptingSerializerDeserializer(SerializerDeserializer wrapped)
focal_class.identifier: EncryptingSerializerDeserializer
focal_class.modifiers: public
focal_class.parameters: (SerializerDeserializer wrapped)
focal_class.signature:  EncryptingSerializerDeserializer(SerializerDeserializer wrapped)
focal_class.class_method_signature: EncryptingSerializerDeserializer.initKey(String key)
focal_class.full_signature:  void initKey(String key)
focal_class.identifier: initKey
focal_class.parameters: (String key)
focal_class.return: void
focal_class.signature: void initKey(String key)
focal_class.class_method_signature: EncryptingSerializerDeserializer.serialize(Object value)
focal_class.full_signature: @Override public byte[] serialize(Object value)
focal_class.identifier: serialize
focal_class.modifiers: @Override public
focal_class.parameters: (Object value)
focal_class.return: byte[]
focal_class.signature: byte[] serialize(Object value)
focal_class.class_method_signature: EncryptingSerializerDeserializer.deserialize(byte[] data)
focal_class.full_signature: @Override public Object deserialize(byte[] data)
focal_class.identifier: deserialize
focal_class.modifiers: @Override public
focal_class.parameters: (byte[] data)
focal_class.return: Object
focal_class.signature: Object deserialize(byte[] data)
focal_class.class_method_signature: EncryptingSerializerDeserializer.setSessionManager(SessionManager sessionManager)
focal_class.full_signature: @Override public void setSessionManager(SessionManager sessionManager)
focal_class.identifier: setSessionManager
focal_class.modifiers: @Override public
focal_class.parameters: (SessionManager sessionManager)
focal_class.return: void
focal_class.signature: void setSessionManager(SessionManager sessionManager)
focal_method.body: void initKey(String key) {
      try {
        byte[] keyArray = key.getBytes("UTF-8");
        MessageDigest sha = MessageDigest.getInstance("SHA-256");
        keyArray = sha.digest(keyArray);
        keyArray = Arrays.copyOf(keyArray, 16);
        secretKey = new SecretKeySpec(keyArray, "AES");
      } catch (Exception e) { // NOSONAR
        throw new IllegalStateException(e);
      }
    }
focal_method.class_method_signature: EncryptingSerializerDeserializer.initKey(String key)
focal_method.full_signature:  void initKey(String key)
focal_method.identifier: initKey
focal_method.invocations: getBytes getInstance digest copyOf
focal_method.parameters: (String key)
focal_method.return: void
focal_method.signature: void initKey(String key)