void () { PsiField field = myClass.findFieldByName("DOUBLE_CONST", false); assertNotNull(field); PsiLiteralExpression initializer = (PsiLiteralExpression)field.getInitializer(); assertNotNull(initializer); assertEquals(PsiTypes.doubleType(), initializer.getType()); assertEquals(new Double(3.456), initializer.getValue()); assertEquals("3.456", initializer.getText()); assertEquals(new Double(3.456), field.computeConstantValue()); }